@Override public int getStyle () { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
public int getStyle () { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
@Override public int getStyle () { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
@Override public int getStyle () { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
public int getStyle () { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
public int getStyle () { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
@Override public int getStyle () { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
@Override public int getStyle() { int style = super.getStyle(); switch (align) { case SWT.RIGHT: style |= SWT.RIGHT; break; case SWT.CENTER: style |= SWT.CENTER; break; case SWT.LEFT: style |= SWT.LEFT; break; } return style; }
/** * Sets the state of the "Example" widgets. */ @Override void setExampleWidgetState () { super.setExampleWidgetState (); horizontalButton.setSelection ((canvas.getStyle () & SWT.H_SCROLL) != 0); verticalButton.setSelection ((canvas.getStyle () & SWT.V_SCROLL) != 0); borderButton.setSelection ((canvas.getStyle () & SWT.BORDER) != 0); noBackgroundButton.setSelection ((canvas.getStyle () & SWT.NO_BACKGROUND) != 0); noFocusButton.setSelection ((canvas.getStyle () & SWT.NO_FOCUS) != 0); noMergePaintsButton.setSelection ((canvas.getStyle () & SWT.NO_MERGE_PAINTS) != 0); noRedrawResizeButton.setSelection ((canvas.getStyle () & SWT.NO_REDRAW_RESIZE) != 0); doubleBufferedButton.setSelection ((canvas.getStyle () & SWT.DOUBLE_BUFFERED) != 0); if (!instance.startup) setCaret (); } }
void recreateCanvas() { if (dbItem.getSelection() == ((canvas.getStyle() & SWT.DOUBLE_BUFFERED) != 0)) return; Object data = canvas.getLayoutData(); if (canvas != null) canvas.dispose(); createCanvas(parent); canvas.setLayoutData(data); parent.layout(true, true); }
/** * Paints the ruler column. * * @param event the paint event */ private void paintControl(PaintEvent event) { if (fTextViewer == null) return; fWasShowingEntireContents= JFaceTextUtil.isShowingEntireContents(fStyledText); fLastTopPixel= fStyledText.getTopPixel(); ILineRange lines= computeDirtyWidgetLines(event); GC gc= event.gc; paint(gc, lines); if ((fCanvas.getStyle() & SWT.NO_BACKGROUND) != 0) { // fill empty area below any lines int firstEmpty= Math.max(event.y, fStyledText.getLinePixel(fStyledText.getLineCount())); int lastEmpty= event.y + event.height; if (lastEmpty > firstEmpty) { gc.setBackground(getDefaultBackground()); gc.fillRectangle(0, firstEmpty, getWidth(), lastEmpty - firstEmpty); } } }
/** * Paints the ruler column. * * @param event the paint event */ private void paintControl(PaintEvent event) { if (fTextViewer == null) return; fWasShowingEntireContents= JFaceTextUtil.isShowingEntireContents(fStyledText); fLastTopPixel= fStyledText.getTopPixel(); ILineRange lines= computeDirtyWidgetLines(event); GC gc= event.gc; paint(gc, lines); if ((fCanvas.getStyle() & SWT.NO_BACKGROUND) != 0) { // fill empty area below any lines int firstEmpty= Math.max(event.y, fStyledText.getLinePixel(fStyledText.getLineCount())); int lastEmpty= event.y + event.height; if (lastEmpty > firstEmpty) { gc.setBackground(getDefaultBackground()); gc.fillRectangle(0, firstEmpty, getWidth(), lastEmpty - firstEmpty); } } }
} else if (drawMode == DRAW_NORMAL || drawMode == DRAW_CENTER || drawMode == DRAW_ANIMATE) { if ((control.getStyle() & SWT.RIGHT) != 0) { e.gc.drawImage(imgSrc, size.x - imgSrcBounds.width, (size.y - imgSrcBounds.height) / 2);