/** 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); }
/** Overridden to supply different tooltips depending on mouse position (name, * value, custom editor button). Will HTML-ize long tooltips*/ @Override public String getToolTipText(MouseEvent e) { if (customEditorIsOpen) { return null; } String result; Point pt = e.getPoint(); int row = rowAtPoint(pt); int col = columnAtPoint(pt); if ((col == 1) && onCustomEditorButton(e)) { result = NbBundle.getMessage(SheetTable.class, "CTL_EDBUTTON_TIP"); // NOI18N } else { result = getSheetModel().getDescriptionFor(row, col); if ((col == 1) && (result != null) && (result.length() > 100)) { //e.g. Jesse's new file list property gives massive //tooltips; break them up result = PropUtils.createHtmlTooltip( getPropertySetModel().getFeatureDescriptor(row).getDisplayName(), result ); } } if ((result != null) && "".equals(result.trim())) { result = null; // prevents 2x2 dot as a tooltip } return result; }
/** Overridden to supply different tooltips depending on mouse position (name, * value, custom editor button). Will HTML-ize long tooltips*/ public String getToolTipText (MouseEvent e) { if (customEditorIsOpen) { return null; } String result; Point pt = e.getPoint(); int row = rowAtPoint (pt); int col = columnAtPoint (pt); if (col == 1 && onCustomEditorButton (e)) { result = NbBundle.getMessage (SheetTable.class, "CTL_EDBUTTON_TIP"); } else { result = getSheetModel().getDescriptionFor (row, col); if (col == 1 && result != null && result.length() > 100) { //e.g. Jesse's new file list property gives massive //tooltips; break them up result = PropUtils.createHtmlTooltip( getPropertySetModel().getFeatureDescriptor(row). getDisplayName(), result); } } return result; }
/** Overridden to supply different tooltips depending on mouse position (name, * value, custom editor button). Will HTML-ize long tooltips*/ public String getToolTipText (MouseEvent e) { if (customEditorIsOpen) { return null; } String result; Point pt = e.getPoint(); int row = rowAtPoint (pt); int col = columnAtPoint (pt); if (col == 1 && onCustomEditorButton (e)) { result = NbBundle.getMessage (SheetTable.class, "CTL_EDBUTTON_TIP"); } else { result = getSheetModel().getDescriptionFor (row, col); if (col == 1 && result != null && result.length() > 100) { //e.g. Jesse's new file list property gives massive //tooltips; break them up result = PropUtils.createHtmlTooltip( getPropertySetModel().getFeatureDescriptor(row). getDisplayName(), result); } } return result; }
if( onCustomEditorButton(me) && !hasFocus()) { if (PropUtils.psCommitOnFocusLoss && isEditing()) { getEditor().stopCellEditing();
if ((e instanceof MouseEvent) && (onCustomEditorButton((MouseEvent) e))) { if (PropUtils.isLoggable(SheetTable.class)) { PropUtils.log(SheetTable.class, "Got a mouse click on the " + "custom editor button"); //NOI18N
if ((e instanceof MouseEvent) && (onCustomEditorButton ( (MouseEvent) e))) { if (PropUtils.isLoggable(SheetTable.class)) {
if ((e instanceof MouseEvent) && (onCustomEditorButton ( (MouseEvent) e))) { if (PropUtils.isLoggable(SheetTable.class)) {