@Override public boolean isEnabled() { final ProductMetadataTable metadataTable = getMetadataTable(); return metadataTable.isExpandAllAllowed(); }
@Override public boolean isEnabled() { final ProductMetadataTable metadataTable = getMetadataTable(); return metadataTable.isExpandAllAllowed(); }
/** * Called when a command should update its state. * <p/> * <p> This method can contain some code which analyzes the underlying element and makes a decision whether * this item or group should be made visible/invisible or enabled/disabled etc. * * @param event the command event */ @Override public void updateState(CommandEvent event) { ProductNodeView view = VisatApp.getApp().getSelectedProductNodeView(); boolean expandAllowed = false; if (view instanceof ProductMetadataView) { final ProductMetadataTable metadataTable = ((ProductMetadataView) view).getMetadataTable(); expandAllowed = metadataTable.isExpandAllAllowed(); } setEnabled(expandAllowed); }
/** * Called when a command should update its state. * <p/> * <p> This method can contain some code which analyzes the underlying element and makes a decision whether * this item or group should be made visible/invisible or enabled/disabled etc. * * @param event the command event */ @Override public void updateState(CommandEvent event) { ProductNodeView view = VisatApp.getApp().getSelectedProductNodeView(); boolean expandAllowed = false; if (view instanceof ProductMetadataView) { final ProductMetadataTable metadataTable = ((ProductMetadataView) view).getMetadataTable(); expandAllowed = metadataTable.isExpandAllAllowed(); } setEnabled(expandAllowed); }