am.put(ACTION_COLLAPSE, collapseAction); am.put(ACTION_CUSTOM_EDITOR, getCustomEditorAction()); am.put(ACTION_EDCLASS, edClassAction);
am.put(ACTION_COLLAPSE, collapseAction); am.put(ACTION_CUSTOM_EDITOR, getCustomEditorAction()); am.put(ACTION_EDCLASS, edClassAction);
am.put(ACTION_COLLAPSE, collapseAction); am.put(ACTION_CUSTOM_EDITOR, getCustomEditorAction()); am.put(ACTION_EDCLASS, edClassAction);
/** Overridden to catch a mouse pressed event over the custom editor * button and invoke the custom editor even if we do not have focus; * otherwise, for example, in the options dialog, clicking from the * tree to the table over the custom editor button will just set focus * to the table, but will not initiate the custom editor dialog */ public void processMouseEvent(MouseEvent me) { if (me.getID() == me.MOUSE_PRESSED) { if (onCustomEditorButton(me) && !hasFocus()) { if (PropUtils.psCommitOnFocusLoss && isEditing()) { getEditor().stopCellEditing(); } int row = rowAtPoint(me.getPoint()); int col = columnAtPoint(me.getPoint()); if (row != -1 && col != -1) { changeSelection(row, col, false, false); getCustomEditorAction().actionPerformed( new ActionEvent (this, ActionEvent.ACTION_PERFORMED, ACTION_CUSTOM_EDITOR)); me.consume(); return; } } } super.processMouseEvent(me); }
/** Overridden to catch a mouse pressed event over the custom editor * button and invoke the custom editor even if we do not have focus; * otherwise, for example, in the options dialog, clicking from the * tree to the table over the custom editor button will just set focus * to the table, but will not initiate the custom editor dialog */ public void processMouseEvent(MouseEvent me) { if (me.getID() == me.MOUSE_PRESSED) { if (onCustomEditorButton(me) && !hasFocus()) { if (PropUtils.psCommitOnFocusLoss && isEditing()) { getEditor().stopCellEditing(); } int row = rowAtPoint(me.getPoint()); int col = columnAtPoint(me.getPoint()); if (row != -1 && col != -1) { changeSelection(row, col, false, false); getCustomEditorAction().actionPerformed( new ActionEvent (this, ActionEvent.ACTION_PERFORMED, ACTION_CUSTOM_EDITOR)); me.consume(); return; } } } super.processMouseEvent(me); }
getCustomEditorAction().actionPerformed( new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ACTION_CUSTOM_EDITOR) );
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; }
getCustomEditorAction().actionPerformed (new ActionEvent (this, 0, null)); exitEditRequest(); return false;
getCustomEditorAction().actionPerformed(new ActionEvent(this, 0, null)); exitEditRequest();
getCustomEditorAction().actionPerformed (new ActionEvent (this, 0, null)); exitEditRequest(); return false;