Java Code Examples for org.eclipse.swt.widgets.Label#getData()
The following examples show how to use
org.eclipse.swt.widgets.Label#getData() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OptionsConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
protected void highlight(final Composite parent, final Label labelControl, final Combo comboBox, final int color) { Object data= labelControl.getData(); if (data == null) { if (color != HIGHLIGHT_NONE) { PaintListener painter= new HighlightPainter(parent, labelControl, comboBox, color); parent.addPaintListener(painter); labelControl.setData(painter); } else { return; } } else { if (color == HIGHLIGHT_NONE) { parent.removePaintListener((PaintListener) data); labelControl.setData(null); } else if (color != ((HighlightPainter) data).fColor){ ((HighlightPainter) data).fColor= color; } else { return; } } parent.redraw(); }
Example 2
Source File: LinkLabel.java From BiglyBT with GNU General Public License v2.0 | 5 votes |
public static void removeLinkedLabel(Label label ) { label.setCursor(null ); label.setForeground(null); label.setData( null ); MouseAdapter ml = (MouseAdapter)label.getData( MOUSE_LISTENER_KEY ); if ( ml != null ){ label.removeMouseListener(ml); } ClipboardCopy.removeCopyToClipMenu( label ); }
Example 3
Source File: LabeledInputField.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Override public void mouseDown(MouseEvent e){ Label l = (Label) e.getSource(); int i = (Integer) l.getData(); ((IContentProvider) def[i].ext).reloadContent(act, def[i]); super.mouseDown(e); }
Example 4
Source File: OptionsConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
protected int getHighlight(Label labelControl) { Object data= labelControl.getData(); if (data == null) return HIGHLIGHT_NONE; return ((HighlightPainter) data).fColor; }