use of org.eclipse.draw2d.LineBorder in project cubrid-manager by CUBRID.
the class TablePart method setFocus.
@Override
public void setFocus(boolean hasFocus) {
TableFigure tableFigure = (TableFigure) getFigure();
LineBorder lineBorder = (LineBorder) tableFigure.getBorder();
if (hasFocus) {
lineBorder.setWidth(2);
} else {
lineBorder.setWidth(1);
}
}
use of org.eclipse.draw2d.LineBorder in project yamcs-studio by yamcs.
the class ScrollbarFigure method initializeParts.
/**
* Initilization of the ScrollBar. Sets the Scrollbar to have a ScrollBarLayout with vertical orientation. Creates
* the Figures that make up the components of the ScrollBar.
*
* @since 2.0
*/
protected void initializeParts() {
setLayoutManager(new ScrollBarFigureLayout(transposer));
setUpClickable(createDefaultUpButton());
setDownClickable(createDefaultDownButton());
setPageUp(createPageUp());
setPageDown(createPageDown());
setThumb(createDefaultThumb());
label = new Label();
label.setBackgroundColor(LABEL_COLOR);
label.setBorder(new LineBorder(GRAY_COLOR));
label.setVisible(false);
// $NON-NLS-1$
add(label, "Label");
}
use of org.eclipse.draw2d.LineBorder in project yamcs-studio by yamcs.
the class TabFigure method createTabLabel.
private Label createTabLabel(String title, final int index) {
final Label tabLabel = new Label(title) {
@Override
protected void paintFigure(Graphics graphics) {
graphics.pushState();
graphics.setForegroundColor(TAB_3D_COLOR);
graphics.fillGradient(getClientArea(), horizontal);
graphics.popState();
super.paintFigure(graphics);
}
};
tabLabel.setLabelAlignment(PositionConstants.CENTER);
tabLabel.setOpaque(false);
tabLabel.setBorder(new LineBorder(BORDER_COLOR));
tabLabel.setBackgroundColor(getDarkColor(DEFAULT_TABCOLOR));
// tabLabel.setCursor(Cursors.HAND);
tabLabel.addMouseListener(new MouseListener.Stub() {
@Override
public void mousePressed(MouseEvent me) {
if (me.button != 1)
return;
setActiveTabIndex(tabLabelList.indexOf(tabLabel));
}
});
return tabLabel;
}
use of org.eclipse.draw2d.LineBorder in project cogtool by cogtool.
the class DesignEditorFrame method addSpeakerBox.
protected void addSpeakerBox() {
speakerBox.setBorder(new LineBorder(ColorConstants.black, 1));
speakerBox.setOpaque(true);
Image speakerIconImg = getSpeakerIconImage();
// TODO: handle getImage returning null
org.eclipse.swt.graphics.Rectangle bds = speakerIconImg.getBounds();
IFigure speakerImgFig = new ImageFigure(speakerIconImg);
IFigure speakerImgToolTip = new Label(L10N.get("DEF.SpeakerText", "Speaker text"));
speakerImgFig.setToolTip(speakerImgToolTip);
speakerImgWidth = bds.width;
speakerImgHeight = bds.height;
speakerLayout.setConstraint(speakerImgFig, new Rectangle(0, 0, bds.width, bds.height));
speakerBox.add(speakerImgFig);
RectangleFigure speakerEastBorder = new RectangleFigure();
speakerEastBorder.setBorder(new LineBorder(ColorConstants.black, 1));
speakerLayout.setConstraint(speakerEastBorder, new Rectangle(speakerImgWidth, 0, SPEAKER_DIVIDER_WIDTH, speakerImgHeight));
speakerBox.add(speakerEastBorder);
timeWestBorder = new RectangleFigure();
timeWestBorder.setBorder(new LineBorder(ColorConstants.black, 1));
speakerBox.add(timeWestBorder);
String text = frame.getSpeakerText();
speakerText = new Label(text);
speakerText.setLabelAlignment(PositionConstants.LEFT);
speakerTextToolTip = new Label(text);
if ((text != null) && !text.equals("")) {
speakerText.setToolTip(speakerTextToolTip);
}
speakerBox.add(speakerText);
divider = new RectangleFigure();
divider.setBorder(new LineBorder(ColorConstants.black, 1));
speakerBox.add(divider);
double listenTimeInSecs = frame.getListenTimeInSecs();
listenTime = new Label((listenTimeInSecs == Frame.NO_LISTEN_TIME) ? NO_LISTEN_TIME_LABEL : Double.toString(listenTimeInSecs));
listenTime.setLabelAlignment(PositionConstants.RIGHT);
speakerBox.add(listenTime);
Label listenTimeToolTip = new Label(LISTEN_TIME_TOOLTIP);
listenTime.setToolTip(listenTimeToolTip);
}
use of org.eclipse.draw2d.LineBorder in project cubrid-manager by CUBRID.
the class TableFigure method setDisableState.
public void setDisableState() {
LineBorder lineBorder = (LineBorder) this.getBorder();
this.setBackgroundColor(disableBackgroundColor);
lineBorder.setColor(disableBorderColor);
}
Aggregations