use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class BusinessTextNonResizableEditPolicy method getFeedbackBounds.
/**
* @generated
*/
protected Rectangle getFeedbackBounds() {
Rectangle bounds;
if (getHostFigure() instanceof Label) {
bounds = ((Label) getHostFigure()).getTextBounds();
bounds.intersect(getHostFigure().getBounds());
} else {
bounds = getHostFigure().getBounds().getCopy();
}
getHostFigure().getParent().translateToAbsolute(bounds);
getFeedbackLayer().translateToRelative(bounds);
return bounds;
}
use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class BusinessTextNonResizableEditPolicy method createSelectionFeedbackFigure.
/**
* @generated
*/
protected IFigure createSelectionFeedbackFigure() {
if (getHostFigure() instanceof Label) {
Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
return feedbackFigure;
} else {
RectangleFigure feedbackFigure = new RectangleFigure();
feedbackFigure.setFill(false);
return feedbackFigure;
}
}
use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class BusinessTextSelectionEditPolicy method createSelectionFeedbackFigure.
/**
* @generated
*/
protected IFigure createSelectionFeedbackFigure() {
if (getHostFigure() instanceof Label) {
Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
return feedbackFigure;
} else {
RectangleFigure feedbackFigure = new RectangleFigure();
feedbackFigure.setFill(false);
return feedbackFigure;
}
}
use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class BusinessTextSelectionEditPolicy method updateLabel.
/**
* @generated
*/
protected void updateLabel(Label target) {
Label source = (Label) getHostFigure();
target.setText(source.getText());
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
}
use of org.eclipse.draw2d.Label in project tdi-studio-se by Talend.
the class BusinessTextSelectionEditPolicy method getFeedbackBounds.
/**
* @generated
*/
protected Rectangle getFeedbackBounds() {
Rectangle bounds;
if (getHostFigure() instanceof Label) {
bounds = ((Label) getHostFigure()).getTextBounds();
bounds.intersect(getHostFigure().getBounds());
} else {
bounds = getHostFigure().getBounds().getCopy();
}
getHostFigure().getParent().translateToAbsolute(bounds);
getFeedbackLayer().translateToRelative(bounds);
return bounds;
}
Aggregations