String getDisplayNameWithMnemonic( Property p ) { String res = null; Object displayNameWithMnemonic = p.getValue(ATTR_DISPLAY_NAME_WITH_MNEMONIC); if( null !=displayNameWithMnemonic && displayNameWithMnemonic.toString().length() > 0 ) { res = displayNameWithMnemonic.toString(); } else { res = p.getDisplayName(); } return res; }
String getDisplayNameWithMnemonic( Property p ) { String res; Object displayNameWithMnemonic = p.getValue(ATTR_DISPLAY_NAME_WITH_MNEMONIC); if( null !=displayNameWithMnemonic && displayNameWithMnemonic.toString().length() > 0 ) { res = displayNameWithMnemonic.toString(); } else { res = p.getDisplayName(); } return res; }
/** Getter for property visibleIndex. * @return Value of property visibleIndex. */ public int getVisibleIndex() { Integer order = (Integer) property.getValue(ATTR_ORDER_NUMBER); if (order == null) return -1; else return order.intValue(); }
boolean isSortOrderDescending() { if ( sortColumn == -1 ) return false; Property p = allPropertyColumns[ sortColumn ].getProperty(); Object o = p.getValue( ATTR_DESCENDING_ORDER ); if ( o != null && o instanceof Boolean ) return ((Boolean)o).booleanValue(); return false; }
public final boolean isShowCustomEditorButton() { boolean result = showCustomEditorButton; if (getProperty() != null) { Boolean explicit = (Boolean) getProperty().getValue( "suppressCustomEditor"); //NOI18N if (explicit != null) { result = !explicit.booleanValue(); } } return result; }
public Object getValue() throws java.lang.reflect.InvocationTargetException { if (DEBUG) checkThread(); try { return getProperty().getValue(); } catch (IllegalAccessException iae) { ErrorManager.getDefault().notify(iae); } return null; }
@Override public Object getValue(String attributeName) { if (attributeName.equals("canAutoComplete")) { //NOI18N return Boolean.FALSE; } return super.getValue(attributeName); }
public void reset() { try { originalValue = getProperty().getValue(); getPropertyEditor().setValue(originalValue); } catch (Exception e) { //should not happen - the value came from the property Logger.getLogger(CustomEditorDisplayer.class.getName()).log(Level.WARNING, null, e); } }
public Object getValue() throws java.lang.reflect.InvocationTargetException { if (DEBUG) { checkThread(); } try { return getProperty().getValue(); } catch (IllegalAccessException iae) { Exceptions.printStackTrace(iae); } return null; }
public final boolean isShowCustomEditorButton() { boolean result = showCustomEditorButton; if (getProperty() != null) { Boolean explicit = (Boolean) getProperty().getValue("suppressCustomEditor"); //NOI18N if (explicit != null) { result = !explicit.booleanValue(); } } return result; }
public final boolean isShowCustomEditorButton() { boolean result = showCustomEditorButton; if (getProperty() != null) { Boolean explicit = (Boolean) getProperty().getValue("suppressCustomEditor"); //NOI18N if (explicit != null) { result = !explicit.booleanValue(); } } return result; }
/** Helper method to ask if column representing a property should be * visible */ private boolean isVisible(Property p) { Object o = p.getValue(ATTR_INVISIBLE); if ((o != null) && o instanceof Boolean) { return !((Boolean) o).booleanValue(); } return true; }
boolean isSortingColumn() { if (p == null) { return false; } Object o = p.getValue(NodeTableModel.ATTR_SORTING_COLUMN); if ((o != null) && o instanceof Boolean) { return ((Boolean) o).booleanValue(); } return false; }
/** Implements <code>PropertyModel</code> interface. */ public Object getValue() throws InvocationTargetException { try { return prop.getValue(); } catch (IllegalAccessException iae) { throw annotateException(iae); } catch (InvocationTargetException ite) { throw annotateException(ite); } catch (ProxyNode.DifferentValuesException dve) { return null; } }
/** * If true, column is currently used for sorting * @param Index to the array of all properties (the column may not be visible) */ boolean isSortingColumnEx(int column) { Property p = allPropertyColumns[column].getProperty(); Object o = p.getValue(ATTR_SORTING_COLUMN); if ((o != null) && o instanceof Boolean) { return ((Boolean) o).booleanValue(); } return false; }
boolean isSortOrderDescending() { if (p == null) { return false; } Object o = p.getValue(NodeTableModel.ATTR_DESCENDING_ORDER); if ((o != null) && o instanceof Boolean) { return ((Boolean) o).booleanValue(); } return false; }
void makeAccessibleCheckBox(JCheckBox box, Property p) { box.getAccessibleContext().setAccessibleName(p.getDisplayName()); box.getAccessibleContext().setAccessibleDescription(p.getShortDescription()); Object mnemonicChar = p.getValue(ATTR_MNEMONIC_CHAR); if ((null != mnemonicChar) && (mnemonicChar.toString().length() > 0)) { box.setMnemonic(mnemonicChar.toString().charAt(0)); } }
boolean isSortOrderDescending() { if (sortColumn == -1) { return false; } Property p = allPropertyColumns[sortColumn].getProperty(); Object o = p.getValue(ATTR_DESCENDING_ORDER); if ((o != null) && o instanceof Boolean) { return ((Boolean) o).booleanValue(); } return false; }
boolean isComparable() { if (p == null) { return false; } Object o = p.getValue(NodeTableModel.ATTR_COMPARABLE_COLUMN); if ((o != null) && o instanceof Boolean) { return ((Boolean) o).booleanValue(); } return false; }
/** * If true, column property should be comparable - allows sorting * @param column Index to the array of all properties */ boolean isComparableColumnEx(int column) { Property p = allPropertyColumns[column].getProperty(); Object o = p.getValue(ATTR_COMPARABLE_COLUMN); if ((o != null) && o instanceof Boolean) { return ((Boolean) o).booleanValue(); } return false; }