use of org.eclipse.gef.internal.ui.palette.editparts.DetailedLabelFigure in project tdi-studio-se by Talend.
the class TalendEntryEditPart method getSelectionRectangle.
protected static Rectangle getSelectionRectangle(int layoutMode, DetailedLabelFigure labelFigure) {
Rectangle rect = Rectangle.SINGLETON;
try {
if (func_getSelectionRectangle == null) {
func_getSelectionRectangle = ToolEntryEditPart.class.getDeclaredMethod("getSelectionRectangle", int.class, DetailedLabelFigure.class);
func_getSelectionRectangle.setAccessible(true);
}
rect = (Rectangle) func_getSelectionRectangle.invoke(ToolEntryEditPart.class, layoutMode, labelFigure);
} catch (Exception e) {
CommonExceptionHandler.process(e);
}
return rect;
}
use of org.eclipse.gef.internal.ui.palette.editparts.DetailedLabelFigure in project tdi-studio-se by Talend.
the class TalendEntryEditPart method createFigure.
@Override
public IFigure createFigure() {
Field customLabelField;
try {
talendCustomLabel = new DetailedLabelFigure();
//$NON-NLS-1$
customLabelField = ToolEntryEditPart.class.getDeclaredField("customLabel");
customLabelField.setAccessible(true);
customLabelField.set(this, talendCustomLabel);
} catch (Exception e) {
CommonExceptionHandler.process(e);
}
Clickable button = new ToolEntryToggle(talendCustomLabel);
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
getPaletteViewer().setActiveTool(getToolEntry());
}
});
return button;
}
Aggregations