/** Convenience getter for the property set model. Delegates to the SheetModel. */ PropertySetModel getPropertySetModel() { return getSheetModel().getPropertySetModel(); }
/** Convenience getter for the property set model. Delegates to the SheetModel. */ PropertySetModel getPropertySetModel () { return getSheetModel().getPropertySetModel(); }
/** Convenience getter for the property set model. Delegates to the SheetModel. */ PropertySetModel getPropertySetModel () { return getSheetModel().getPropertySetModel(); }
/** Called when a property value changes, in order to update * the UI with the new value. */ public void propertyChange(PropertyChangeEvent evt) { int index = getPropertySetModel().indexOf ((FeatureDescriptor) evt.getSource()); if (index == -1) { //We don't know what happened, do a generic change event fireTableChanged( new TableModelEvent(this) ); } else { TableModelEvent tme = new TableModelEvent (this, index); fireTableChanged(tme); } }
/** Called when a property value changes, in order to update * the UI with the new value. */ public void propertyChange(PropertyChangeEvent evt) { int index = getPropertySetModel().indexOf ((FeatureDescriptor) evt.getSource()); if (index == -1) { //We don't know what happened, do a generic change event fireTableChanged( new TableModelEvent(this) ); } else { TableModelEvent tme = new TableModelEvent (this, index); fireTableChanged(tme); } }
/** Set the model which determines the ordering of properties and expansion * state of embedded property sets. */ public void setPropertySetModel (PropertySetModel psm) { PropertySetModel old = getSheetModel().getPropertySetModel(); if (old == psm) return; if (old != null) { old.removePropertySetModelListener (this); } getSheetModel().setPropertySetModel (psm); psm.addPropertySetModelListener (this); }
/** Set the model which determines the ordering of properties and expansion * state of embedded property sets. */ public void setPropertySetModel (PropertySetModel psm) { PropertySetModel old = getSheetModel().getPropertySetModel(); if (old == psm) return; if (old != null) { old.removePropertySetModelListener (this); } getSheetModel().setPropertySetModel (psm); psm.addPropertySetModelListener (this); }
/** Toggle the expanded state of a property set. If editing, the edit is * cancelled. */ private void toggleExpanded(int index) { if (isEditing()) { getEditor().cancelCellEditing(); } PropertySetModel psm = getSheetModel().getPropertySetModel(); psm.toggleExpanded(index); }
/** Toggle the expanded state of a property set. If editing, the edit is * cancelled. */ private void toggleExpanded (int index) { if (isEditing()) getEditor().cancelCellEditing(); PropertySetModel psm = getSheetModel().getPropertySetModel(); psm.toggleExpanded (index); }
/** Set the model which determines the ordering of properties and expansion * state of embedded property sets. */ public void setPropertySetModel(PropertySetModel psm) { PropertySetModel old = getSheetModel().getPropertySetModel(); if (old == psm) { return; } if (old != null) { old.removePropertySetModelListener(this); } getSheetModel().setPropertySetModel(psm); psm.addPropertySetModelListener(this); }
/** Toggle the expanded state of a property set. If editing, the edit is * cancelled. */ private void toggleExpanded (int index) { if (isEditing()) getEditor().cancelCellEditing(); PropertySetModel psm = getSheetModel().getPropertySetModel(); psm.toggleExpanded (index); }
/** Internal implementation of getSelection() which returns the selected feature * descriptor whether or not the component has focus. */ public final FeatureDescriptor _getSelection() { int i = getSelectedRow(); FeatureDescriptor result; //Check bounds - a change can be fired after the model has been changed, but //before the table has received the event and updated itself, in which case //you get an AIOOBE if (i < getPropertySetModel().getCount()) { result = getSheetModel().getPropertySetModel().getFeatureDescriptor(getSelectedRow()); } else { result = null; } return result; }
/** Internal implementation of getSelection() which returns the selected feature * descriptor whether or not the component has focus. */ public final FeatureDescriptor _getSelection() { int i = getSelectedRow(); FeatureDescriptor result; //Check bounds - a change can be fired after the model has been changed, but //before the table has received the event and updated itself, in which case //you get an AIOOBE if (i < getPropertySetModel().getCount()) { result = getSheetModel().getPropertySetModel().getFeatureDescriptor(getSelectedRow()); } else { result = null; } return result; }
/** Internal implementation of getSelection() which returns the selected feature * descriptor whether or not the component has focus. */ public final FeatureDescriptor _getSelection() { int i = getSelectedRow(); FeatureDescriptor result; //Check bounds - a change can be fired after the model has been changed, but //before the table has received the event and updated itself, in which case //you get an AIOOBE if (i < getPropertySetModel().getCount()) { result = getSheetModel().getPropertySetModel().getFeatureDescriptor(getSelectedRow()); } else { result = null; } return result; }
int row = rowAtPoint(pt); int col = columnAtPoint(pt); FeatureDescriptor fd = getSheetModel().getPropertySetModel().getFeatureDescriptor(row);
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { Component result = null; //since you can't change the model, no worries SheetTable stb = (SheetTable) table; lastUpdateSuccess = true; //fetch the property from the set model Property p = (Property) stb.getSheetModel().getPropertySetModel().getFeatureDescriptor(row); result = getEditorComponent( p, this, table.getForeground(), table.getBackground(), table.getSelectionBackground(), table.getSelectionForeground() ); if (result instanceof ButtonPanel) { ((ButtonPanel) result).setButtonAction(stb.getCustomEditorAction()); } if (result != null) { result.setFont(stb.getFont()); } return result; }
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { Component result = null; //since you can't change the model, no worries SheetTable stb = (SheetTable) table; lastUpdateSuccess=true; //fetch the property from the set model Property p = (Property) stb.getSheetModel() .getPropertySetModel().getFeatureDescriptor(row); result = getEditorComponent (p, this, table.getForeground(), table.getBackground(), table.getSelectionBackground(), table.getSelectionForeground()); if (result instanceof ButtonPanel) { ((ButtonPanel) result).setButtonAction (stb.getCustomEditorAction()); } if (result != null) { result.setFont(stb.getFont()); } return result; }
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { Component result = null; //since you can't change the model, no worries SheetTable stb = (SheetTable) table; lastUpdateSuccess=true; //fetch the property from the set model Property p = (Property) stb.getSheetModel() .getPropertySetModel().getFeatureDescriptor(row); result = getEditorComponent (p, this, table.getForeground(), table.getBackground(), table.getSelectionBackground(), table.getSelectionForeground()); if (result instanceof ButtonPanel) { ((ButtonPanel) result).setButtonAction (stb.getCustomEditorAction()); } if (result != null) { result.setFont(stb.getFont()); } return result; }
FeatureDescriptor fd = getSheetModel().getPropertySetModel().getFeatureDescriptor(row); if (fd.getValue("stringValues") != null) return false; //NOI18N Property p = fd instanceof Property ? (Property) fd : null;
FeatureDescriptor fd = getSheetModel().getPropertySetModel().getFeatureDescriptor(row); if (fd.getValue("stringValues") != null) return false; //NOI18N Property p = fd instanceof Property ? (Property) fd : null;