Java Code Examples for org.eclipse.swt.widgets.Label.getData()

The following are Jave code examples for showing how to use getData() of the org.eclipse.swt.widgets.Label class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: openaudible   File: BookInfoPanel.java   View Source Code Vote up 6 votes
private void update(Book b) {
    curBook = b;


    setThumbnailImage(b);

    for (Label s : stats) {
        if (s == null) continue;
        BookElement e = (BookElement) s.getData();
        String value = "";
        if (b != null) {
            value = getValue(e, b);
        }
        s.setText(value);
    }

    if (b != null) {
        if (LOG.isTraceEnabled())
            LOG.trace(b.inspect("\n"));
    }
}
 
Example 2
Project: Hydrograph   File: MouseDownSchemaGridListener.java   View Source Code Vote up 5 votes
@Override
public void mouseAction(PropertyDialogButtonBar propertyDialogButtonBar,
		ListenerHelper helpers, Event event, Widget... widgets) {
	 Table table=(Table)widgets[0];
	 Label label=(Label)event.widget;
	 Event e = new Event();
        e.item = (TableItem) label.getData("_TABLEITEM");
        table.setSelection(new TableItem[] { (TableItem) e.item });
        table.notifyListeners(SWT.Selection, e);
}