use of org.eclipse.draw2d.Label in project cogtool by cogtool.
the class AbstractGraphicalSource method buildToolTip.
public void buildToolTip() {
if (this.showToolTip) {
String toolTipText = buildToolTipText(getModel(), getTypeDescription());
Label toolTipLabel = new Label(" " + toolTipText + " ");
toolTipLabel.setFont(FontUtils.SYMBOL_FONT);
setToolTip(toolTipLabel);
}
}
use of org.eclipse.draw2d.Label in project cogtool by cogtool.
the class DesignEditorTransition method buildToolTip.
protected void buildToolTip() {
if (showToolTip) {
String transitionAction = transition.getAction().getLocalizedString();
TransitionSource source = transition.getSource();
StringBuilder toolTipText = new StringBuilder();
String sourceName = SWTStringUtil.insertEllipsis(source.getName(), 100, StringUtil.EQUAL, FontUtils.SYMBOL_FONT);
String sourceFrameName = SWTStringUtil.insertEllipsis(source.getFrame().getName(), 150, StringUtil.NO_FRONT, FontUtils.SYMBOL_FONT);
String destName = SWTStringUtil.insertEllipsis(transition.getDestination().getName(), StringUtil.NO_FRONT, FontUtils.SYMBOL_FONT);
toolTipText.append(KeyDisplayUtil.convertActionToDisplay(transitionAction));
toolTipText.append("\n " + L10N.get("DE.Source", "Source") + ": ");
toolTipText.append(sourceName + " (" + sourceFrameName + ")");
toolTipText.append("\n " + L10N.get("DE.Target", "Target") + ": ");
toolTipText.append(destName);
Label toolTipLabel = new Label(" " + toolTipText.toString() + " ");
toolTipLabel.setFont(FontUtils.SYMBOL_FONT);
setToolTip(toolTipLabel);
}
}
use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class XmlMapDataEditPart method performRequest.
@Override
public void performRequest(Request req) {
if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
DirectEditRequest drequest = (DirectEditRequest) req;
Point figureLocation = drequest.getLocation();
IFigure findFigureAt = getFigure().findFigureAt(figureLocation.x, figureLocation.y);
if (findFigureAt != null && findFigureAt instanceof Label) {
directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator((Figure) findFigureAt));
directEditManager.show();
}
if (directEditManager != null) {
if (findFigureAt != null && findFigureAt instanceof Label) {
if (figure.containsPoint(figureLocation)) {
directEditManager.show();
((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
}
}
}
}
}
use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class MonitorConnectionLabelPart method refreshVisuals.
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
*/
@Override
protected void refreshVisuals() {
String text = ((MonitorConnectionLabel) getModel()).getLabelText();
Label figure = (Label) getFigure();
// figure.setIcon(null); //TODO add icon to it
figure.setText(text);
figure.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
ConnectionPart parent = (ConnectionPart) getParent();
PolylineConnection connFigure = (PolylineConnection) parent.getFigure();
//$NON-NLS-1$
MonitorConnectionLabelConstraint constraint = new MonitorConnectionLabelConstraint(text, "center", null, connFigure);
parent.setLayoutConstraint(this, getFigure(), constraint);
}
use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class OutputZoneToolBar method setTooltips.
private void setTooltips() {
Label tooltip = new Label();
tooltip.setText("Add output table");
add_btn.setToolTip(tooltip);
tooltip = new Label();
tooltip.setText("Remove selected output table");
remove_btn.setToolTip(tooltip);
tooltip = new Label();
tooltip.setText("Move up selected output table");
move_up.setToolTip(tooltip);
tooltip = new Label();
tooltip.setText("Move down selected output table");
move_down.setToolTip(tooltip);
tooltip = new Label();
tooltip.setText("Minimize all output tables");
min_size.setToolTip(tooltip);
tooltip = new Label();
tooltip.setText("Map automatically inputs and outputs (for empty expressions only)");
auto_map.setToolTip(tooltip);
}
Aggregations