@Bindable public void closeDialog() { lastClicked = CANCELLED; this.dialog.hide(); Spoon.getInstance().refreshTree(); // listeners may remove themselves, old-style iteration for ( int i = 0; i < listeners.size(); i++ ) { listeners.get( i ).onDialogCancel(); } }
/** * @return the id of the element responsible for toggling between "Quick Setup" and "Advanced Options" modes */ @Bindable public String getModeToggleLabelElementId() { return MODE_TOGGLE_LABEL; }
@Bindable public void setSelectedFields( Object[] aFields ) { IAvailableItem[] f = new IAvailableItem[aFields.length]; for ( int i = 0; i < aFields.length; i++ ) { if ( aFields[i] instanceof AvailableField ) { f[i] = (AvailableField) aFields[i]; } else if ( aFields[i] instanceof AvailableTable ) { f[i] = (AvailableTable) aFields[i]; } } selectedFields = f; }
@Bindable public Object[] getSelectedFields() { if ( selectedFields == null ) { selectedFields = new IAvailableItem[] {}; } return selectedFields; }
/** * Returns the Mondrian Schema constant (as String) that represents this role See: * http://mondrian.pentaho.com/documentation/schema.php#Time_dimensions and * http://mondrian.pentaho.com/api/mondrian/olap/LevelType.html **/ @Bindable public String getMondrianAttributeValue() { return "Time" + this.name; }
@Override @Bindable public String getValidImage() { return "images/sm_folder_icon.png"; //$NON-NLS-1$ }
@Bindable public void setOozieUrl( String oozieUrl ) { String prev = this.oozieUrl; this.oozieUrl = oozieUrl; pcs.firePropertyChange( OOZIE_URL, prev, this.oozieUrl ); }
@Bindable public void setOozieWorkflowConfig( String oozieWorkflowConfig ) { String prev = this.oozieWorkflowConfig; this.oozieWorkflowConfig = oozieWorkflowConfig; pcs.firePropertyChange( OOZIE_WORKFLOW_CONFIG, prev, this.oozieWorkflowConfig ); }
@Bindable public void setModeToggleLabel( String modeToggleLabel ) { String prev = this.modeToggleLabel; this.modeToggleLabel = modeToggleLabel; firePropertyChange( "modeToggleLabel", prev, modeToggleLabel ); }
@Bindable public void setColumnName( String name ) { String prevName = colName; if ( prevName == null && "".equals( name ) ) { return; } if ( prevName != null && name != null && prevName.equals( name ) ) { return; } colName = name; this.firePropertyChange( "columnName", prevName, colName ); //$NON-NLS-1$ }
@Bindable public void setCaptionColumnName( String name ) { String prevName = captionColName; if ( prevName == null && "".equals( name ) ) { return; } if ( prevName != null && name != null && prevName.equals( name ) ) { return; } captionColName = name; this.firePropertyChange( "captionColumnName", prevName, captionColName ); //$NON-NLS-1$ }
@Bindable public void setNamedCluster( NamedCluster namedCluster ) { this.namedCluster = namedCluster; if ( namedCluster != null ) { this.clusterName = namedCluster.getName(); this.oozieUrl = namedCluster.getOozieUrl(); } }
@Bindable public void addNewProperty() { advancedArgumentsChanged = true; try { advancedArguments.add( new PropertyEntry( "key", "value" ) ); } catch ( Exception e ) { // set elements manually to workaround a failure with adding new item when there is a cell in edit mode variablesTree.setElements( advancedArguments ); } }
@Bindable public boolean isUniqueMembers() { if ( getNode() == null ) { return false; } return getNode().isUniqueMembers(); }
@Bindable public boolean isBackingColumnAvailable() { if ( getNode() != null ) { return getNode().getLogicalColumn() != null; } else { return false; } }
@Bindable public boolean isTimeDimension() { if ( getNode() == null ) { return false; } return getNode().isTimeDimension(); }
@Bindable public String getName() { if ( getNode() == null ) { return null; } return getNode().getName(); }
@Bindable public void setName( String name ) { if ( !name.equals( this.name ) ) { String oldName = this.name; String prevDisplay = getDisplayName(); this.name = name; this.firePropertyChange( "name", oldName, this.name ); //$NON-NLS-1$ this.firePropertyChange( "displayName", prevDisplay, getName() ); //$NON-NLS-1$ validateNode(); } }
@Bindable public void setName( String name ) { if ( getNode() != null ) { getNode().setName( name ); } this.name.setValue( name ); }
@Bindable public void setUniqueMembers( boolean uniqueMembers ) { if ( getNode() != null ) { getNode().setUniqueMembers( uniqueMembers ); } if ( uniqueMembers == hasUniqueMembers.isChecked() ) { return; } hasUniqueMembers.setChecked( uniqueMembers ); }