Updated Rule
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@114021 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6b80005f53
commit
a0891c2e3b
|
@ -38,7 +38,7 @@ public class RuleToolBar {
|
|||
|
||||
//Rules
|
||||
private TextButton ruleNewButton;
|
||||
private TextButton ruleEditButton;
|
||||
private TextButton ruleOpenButton;
|
||||
private TextButton ruleDeleteButton;
|
||||
private TextButton ruleApplyButton;
|
||||
private TextButton ruleShareButton;
|
||||
|
@ -72,7 +72,7 @@ public class RuleToolBar {
|
|||
rulesGroup.add(templateLayout);
|
||||
|
||||
ruleNewButton = new TextButton(msgs.ruleNewButton(),
|
||||
TabularDataResources.INSTANCE.templateAdd32());
|
||||
TabularDataResources.INSTANCE.ruleAdd32());
|
||||
ruleNewButton.enable();
|
||||
ruleNewButton.setToolTip(msgs.ruleNewButtonToolTip());
|
||||
ruleNewButton.setScale(ButtonScale.LARGE);
|
||||
|
@ -89,14 +89,14 @@ public class RuleToolBar {
|
|||
templateLayout.setWidget(0, 0, ruleNewButton);
|
||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
ruleEditButton = new TextButton(msgs.ruleEditButton(),
|
||||
TabularDataResources.INSTANCE.templateEdit32());
|
||||
ruleEditButton.enable();
|
||||
ruleEditButton.setToolTip(msgs.ruleEditButtonToolTip());
|
||||
ruleEditButton.setScale(ButtonScale.LARGE);
|
||||
ruleEditButton.setIconAlign(IconAlign.TOP);
|
||||
ruleEditButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
ruleEditButton.addSelectHandler(new SelectHandler() {
|
||||
ruleOpenButton = new TextButton(msgs.ruleOpenButton(),
|
||||
TabularDataResources.INSTANCE.ruleEdit32());
|
||||
ruleOpenButton.enable();
|
||||
ruleOpenButton.setToolTip(msgs.ruleOpenButtonToolTip());
|
||||
ruleOpenButton.setScale(ButtonScale.LARGE);
|
||||
ruleOpenButton.setIconAlign(IconAlign.TOP);
|
||||
ruleOpenButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
ruleOpenButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
eventBus.fireEvent(new RibbonEvent(
|
||||
|
@ -104,12 +104,12 @@ public class RuleToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
templateLayout.setWidget(0, 1, ruleEditButton);
|
||||
templateLayout.setWidget(0, 1, ruleOpenButton);
|
||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
|
||||
|
||||
ruleDeleteButton = new TextButton(msgs.ruleDeleteButton(),
|
||||
TabularDataResources.INSTANCE.templateDelete32());
|
||||
TabularDataResources.INSTANCE.ruleDelete32());
|
||||
ruleDeleteButton.enable();
|
||||
ruleDeleteButton.setToolTip(msgs.ruleDeleteButtonToolTip());
|
||||
ruleDeleteButton.setScale(ButtonScale.LARGE);
|
||||
|
@ -128,7 +128,7 @@ public class RuleToolBar {
|
|||
|
||||
|
||||
ruleApplyButton = new TextButton(msgs.ruleApplyButton(),
|
||||
TabularDataResources.INSTANCE.templateApply32());
|
||||
TabularDataResources.INSTANCE.ruleApply32());
|
||||
ruleApplyButton.disable();
|
||||
ruleApplyButton.setScale(ButtonScale.LARGE);
|
||||
ruleApplyButton.setIconAlign(IconAlign.TOP);
|
||||
|
@ -146,7 +146,7 @@ public class RuleToolBar {
|
|||
|
||||
|
||||
ruleShareButton = new TextButton(msgs.ruleShareButton(),
|
||||
TabularDataResources.INSTANCE.templateShare32());
|
||||
TabularDataResources.INSTANCE.ruleShare32());
|
||||
ruleShareButton.enable();
|
||||
ruleShareButton.setScale(ButtonScale.LARGE);
|
||||
ruleShareButton.setIconAlign(IconAlign.TOP);
|
||||
|
@ -191,7 +191,7 @@ public class RuleToolBar {
|
|||
try {
|
||||
switch (uiStateType) {
|
||||
case START:
|
||||
ruleEditButton.enable();
|
||||
ruleOpenButton.enable();
|
||||
ruleNewButton.enable();
|
||||
ruleDeleteButton.enable();
|
||||
ruleApplyButton.disable();
|
||||
|
@ -199,7 +199,7 @@ public class RuleToolBar {
|
|||
break;
|
||||
case TR_CLOSE:
|
||||
case TR_READONLY:
|
||||
ruleEditButton.enable();
|
||||
ruleOpenButton.enable();
|
||||
ruleNewButton.enable();
|
||||
ruleDeleteButton.enable();
|
||||
ruleApplyButton.disable();
|
||||
|
@ -208,14 +208,14 @@ public class RuleToolBar {
|
|||
case TR_OPEN:
|
||||
case TABLEUPDATE:
|
||||
case TABLECURATION:
|
||||
ruleEditButton.enable();
|
||||
ruleOpenButton.enable();
|
||||
ruleNewButton.enable();
|
||||
ruleDeleteButton.enable();
|
||||
ruleApplyButton.enable();
|
||||
ruleShareButton.enable();
|
||||
break;
|
||||
case WIZARD_OPEN:
|
||||
ruleEditButton.disable();
|
||||
ruleOpenButton.disable();
|
||||
ruleNewButton.disable();
|
||||
ruleDeleteButton.disable();
|
||||
ruleApplyButton.disable();
|
||||
|
|
|
@ -19,11 +19,11 @@ public interface RuleToolBarMessages extends Messages {
|
|||
@DefaultMessage("New")
|
||||
String ruleNewButtonToolTip();
|
||||
|
||||
@DefaultMessage("Edit")
|
||||
String ruleEditButton();
|
||||
@DefaultMessage("Open")
|
||||
String ruleOpenButton();
|
||||
|
||||
@DefaultMessage("Edit")
|
||||
String ruleEditButtonToolTip();
|
||||
@DefaultMessage("Open")
|
||||
String ruleOpenButtonToolTip();
|
||||
|
||||
@DefaultMessage("Delete")
|
||||
String ruleDeleteButton();
|
||||
|
|
|
@ -58,11 +58,13 @@ public class TabularDataRibbon {
|
|||
con.add(modifyToolBar.getToolBar(), vldata);
|
||||
ribbon.add(con, msgs.modify());
|
||||
|
||||
|
||||
ruleToolBar = new RuleToolBar(eventBus);
|
||||
con = new VerticalLayoutContainer();
|
||||
con.add(ruleToolBar.getToolBar(), vldata);
|
||||
ribbon.add(con, msgs.rule());
|
||||
|
||||
|
||||
templateToolBar = new TemplateToolBar(eventBus);
|
||||
con = new VerticalLayoutContainer();
|
||||
con.add(templateToolBar.getToolBar(), vldata);
|
||||
|
|
Loading…
Reference in New Issue