Search in sources :

Example 6 with Label

use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.

the class SearchZoneToolBar method setTooltips.

private void setTooltips() {
    Label tooltip = new Label();
    tooltip.setText("next");
    move_down.setToolTip(tooltip);
    tooltip = new Label();
    tooltip.setText("previous");
    move_up.setToolTip(tooltip);
    tooltip = new Label();
    tooltip.setText("hightlight all");
    hightLightAll.setToolTip(tooltip);
}
Also used : Label(org.eclipse.draw2d.Label)

Example 7 with Label

use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.

the class InputZoneToolBar method setTooltips.

private void setTooltips() {
    Label tooltip = new Label();
    tooltip.setText("Move up selected input lookup table");
    move_up.setToolTip(tooltip);
    tooltip = new Label();
    tooltip.setText("Move down selected input lookup table");
    move_down.setToolTip(tooltip);
    tooltip = new Label();
    tooltip.setText("Minimize all input tables");
    min_size.setToolTip(tooltip);
// disable for 5.0.0
// tooltip = new Label();
// tooltip.setText("Setup the configurations of tXMLMap");
// propertyButton.setToolTip(tooltip);
}
Also used : Label(org.eclipse.draw2d.Label)

Example 8 with Label

use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.

the class ConnLabelEditPart method createFigure.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
@Override
public IFigure createFigure() {
    String text = ((ConnectionLabel) getModel()).getLabelText();
    Label label = new Label();
    label.setText(text);
    return label;
}
Also used : Label(org.eclipse.draw2d.Label)

Example 9 with Label

use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.

the class ConnLabelEditPart method refreshVisuals.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
     */
@Override
protected void refreshVisuals() {
    String text = ((ConnectionLabel) getModel()).getLabelText();
    Point offset = ((ConnectionLabel) getModel()).getOffset();
    Label figure = (Label) getFigure();
    figure.setText(text);
    ConnectionPart parent = (ConnectionPart) getParent();
    PolylineConnection connFigure = (PolylineConnection) parent.getFigure();
    //$NON-NLS-1$
    ConnLabelConstraint constraint = new ConnLabelConstraint(text, "center", offset, connFigure);
    parent.setLayoutConstraint(this, getFigure(), constraint);
}
Also used : Label(org.eclipse.draw2d.Label) Point(org.eclipse.draw2d.geometry.Point) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 10 with Label

use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.

the class CollapseFigure method setCollapsed.

/**
     * setCollapsed Setter method to change collapsed state of the figure. Will force update to repaint the figure to
     * reflect the changes.
     * 
     * @param b boolean true to set collapsed, false to uncollapse.
     */
public void setCollapsed(boolean b) {
    collapsed = b;
    Image img;
    if (isCollapsed()) {
        img = getExpandFigure();
    } else {
        img = getCollapseFigure();
    }
    setContents(new Label(img));
// revalidate();
// repaint();
}
Also used : Label(org.eclipse.draw2d.Label) EImage(org.talend.commons.ui.runtime.image.EImage) Image(org.eclipse.swt.graphics.Image)

Aggregations

Label (org.eclipse.draw2d.Label)56 IFigure (org.eclipse.draw2d.IFigure)8 Rectangle (org.eclipse.draw2d.geometry.Rectangle)8 Point (org.eclipse.draw2d.geometry.Point)7 LineBorder (org.eclipse.draw2d.LineBorder)6 WrapLabel (org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel)6 Image (org.eclipse.swt.graphics.Image)6 MouseEvent (org.eclipse.draw2d.MouseEvent)5 MouseListener (org.eclipse.draw2d.MouseListener)5 ArrayList (java.util.ArrayList)4 List (java.util.List)4 Figure (org.eclipse.draw2d.Figure)4 RectangleFigure (org.eclipse.draw2d.RectangleFigure)4 Dimension (org.eclipse.draw2d.geometry.Dimension)4 PolylineConnection (org.eclipse.draw2d.PolylineConnection)3 ToolbarLayout (org.eclipse.draw2d.ToolbarLayout)3 EImage (org.talend.commons.ui.runtime.image.EImage)3 ComboCellLabel (org.talend.designer.gefabstractmap.figures.ComboCellLabel)3 RowBorder (org.talend.designer.gefabstractmap.figures.borders.RowBorder)3 CompoundBorder (org.eclipse.draw2d.CompoundBorder)2