Class CTabRendering
- All Implemented Interfaces:
IEclipsePreferences.IPreferenceChangeListener,org.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA named preference for setting CTabFolder's to be rendered without icons in view areasstatic final booleanDefault value for "hide icons" preference for view tabsstatic final StringA named preference for setting CTabFolder's to show full text in view areasstatic final booleanDefault value for "show full text" preference for view tabsstatic final StringA named preference for setting CTabFolder's to be rendered with rounded cornersstatic final booleanDefault value for "use round tabs" preferenceFields inherited from class org.eclipse.swt.custom.CTabFolderRenderer
MINIMUM_SIZE, parent, PART_BACKGROUND, PART_BODY, PART_BORDER, PART_CHEVRON_BUTTON, PART_CLOSE_BUTTON, PART_HEADER, PART_MAX_BUTTON, PART_MIN_BUTTON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PointcomputeSize(int part, int state, GC gc, int wHint, int hHint) Returns the preferred size of a part.protected RectanglecomputeTrim(int part, int state, int x, int y, int width, int height) Given a desired client area for the part (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.protected voidDraw a specifiedpartof the CTabFolder using the providedboundsandGC.voidNotification that a preference value has changed in the preference store.voidsetActive(boolean active) voidsetCornerRadius(int radius) voidsetDrawCustomTabContentBackground(boolean drawCustomTabContentBackground) Sets whether to use a custom tab background (reusing tab colors and gradients), or default one from plain CTabFolder (using widget background color).voidsetInnerKeyline(Color color) voidsetOuterKeyline(Color color) voidsetPadding(int paddingLeft, int paddingRight, int paddingTop, int paddingBottom) voidsetSelectedTabFill(Color color) voidsetSelectedTabFill(Color[] colors, int[] percents) voidsetSelectedTabHighlight(Color color) voidsetSelectedTabHighlightTop(boolean drawTabHiglightOnTop) voidsetTabOutline(Color color) voidvoidsetUnselectedTabsColor(Color color) voidsetUnselectedTabsColor(Color[] colors, int[] percents) Methods inherited from class org.eclipse.swt.custom.CTabFolderRenderer
disposeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.e4.ui.internal.css.swt.ICTabRendering
setShadowColor, setShadowVisible
-
Field Details
-
USE_ROUND_TABS
A named preference for setting CTabFolder's to be rendered with rounded cornersThe default value for this preference is:
false(render CTabFolder's with square corners)- See Also:
-
USE_ROUND_TABS_DEFAULT
public static final boolean USE_ROUND_TABS_DEFAULTDefault value for "use round tabs" preference- See Also:
-
HIDE_ICONS_FOR_VIEW_TABS
A named preference for setting CTabFolder's to be rendered without icons in view areasThe default value for this preference is:
false(render CTabFolder's with icons)- See Also:
-
HIDE_ICONS_FOR_VIEW_TABS_DEFAULT
public static final boolean HIDE_ICONS_FOR_VIEW_TABS_DEFAULTDefault value for "hide icons" preference for view tabs- See Also:
-
SHOW_FULL_TEXT_FOR_VIEW_TABS
A named preference for setting CTabFolder's to show full text in view areasThe default value for this preference is:
false(render CTabFolder's without full text)- See Also:
-
SHOW_FULL_TEXT_FOR_VIEW_TABS_DEFAULT
public static final boolean SHOW_FULL_TEXT_FOR_VIEW_TABS_DEFAULTDefault value for "show full text" preference for view tabs- See Also:
-
-
Constructor Details
-
CTabRendering
-
-
Method Details
-
setUnselectedHotTabsColorBackground
- Specified by:
setUnselectedHotTabsColorBackgroundin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
computeTrim
Description copied from class:CTabFolderRendererGiven a desired client area for the part (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.In other words, it returns a rectangle such that, if the part's bounds were set to that rectangle, the area of the part which is capable of displaying data (that is, not covered by the "trimmings") would be the rectangle described by the arguments (relative to the receiver's parent).
- Overrides:
computeTrimin classCTabFolderRenderer- Parameters:
part- one of the part constantsstate- the state of the partx- the desired x coordinate of the client areay- the desired y coordinate of the client areawidth- the desired width of the client areaheight- the desired height of the client area- Returns:
- the required bounds to produce the given client area
- See Also:
-
computeSize
Description copied from class:CTabFolderRendererReturns the preferred size of a part.The preferred size of a part is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask a control questions such as "Given a particular width, how high does the part need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant
SWT.DEFAULTis passed for the hint.The
partvalue indicated what component the preferred size is to be calculated for. Valid values are any of the part constants:- PART_BODY
- PART_HEADER
- PART_BORDER
- PART_BACKGROUND
- PART_MAX_BUTTON
- PART_MIN_BUTTON
- PART_CHEVRON_BUTTON
- PART_CLOSE_BUTTON
- A positive integer which is the index of an item in the CTabFolder.
The
stateparameter may be one of the following:- SWT.NONE
- SWT.SELECTED - whether the part is selected
- Overrides:
computeSizein classCTabFolderRenderer- Parameters:
part- a part constantstate- current stategc- the gc to use for measuringwHint- the width hint (can beSWT.DEFAULT)hHint- the height hint (can beSWT.DEFAULT)- Returns:
- the preferred size of the part
-
draw
Description copied from class:CTabFolderRendererDraw a specifiedpartof the CTabFolder using the providedboundsandGC.The valid CTabFolder
partconstants are:- PART_BODY - the entire body of the CTabFolder
- PART_HEADER - the upper tab area of the CTabFolder
- PART_BORDER - the border of the CTabFolder
- PART_BACKGROUND - the background of the CTabFolder
- PART_MAX_BUTTON
- PART_MIN_BUTTON
- PART_CHEVRON_BUTTON
- PART_CLOSE_BUTTON
- A positive integer which is the index of an item in the CTabFolder.
The
stateparameter may be a combination of:- SWT.BACKGROUND - whether the background should be drawn
- SWT.FOREGROUND - whether the foreground should be drawn
- SWT.SELECTED - whether the part is selected
- SWT.HOT - whether the part is hot (i.e. mouse is over the part)
- Overrides:
drawin classCTabFolderRenderer- Parameters:
part- part to drawstate- state of the partbounds- the bounds of the partgc- the gc to draw the part on
-
blur
-
getPadding
-
setPadding
public void setPadding(int paddingLeft, int paddingRight, int paddingTop, int paddingBottom) -
setCornerRadius
public void setCornerRadius(int radius) - Specified by:
setCornerRadiusin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setOuterKeyline
- Specified by:
setOuterKeylinein interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabHighlight
- Specified by:
setSelectedTabHighlightin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabFill
- Specified by:
setSelectedTabFillin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabFill
- Specified by:
setSelectedTabFillin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setUnselectedTabsColor
- Specified by:
setUnselectedTabsColorin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setUnselectedTabsColor
- Specified by:
setUnselectedTabsColorin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setTabOutline
- Specified by:
setTabOutlinein interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setInnerKeyline
- Specified by:
setInnerKeylinein interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setActive
public void setActive(boolean active) -
setDrawCustomTabContentBackground
public void setDrawCustomTabContentBackground(boolean drawCustomTabContentBackground) Sets whether to use a custom tab background (reusing tab colors and gradients), or default one from plain CTabFolder (using widget background color).- Specified by:
setDrawCustomTabContentBackgroundin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabHighlightTop
public void setSelectedTabHighlightTop(boolean drawTabHiglightOnTop) - Specified by:
setSelectedTabHighlightTopin interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
preferenceChange
Description copied from interface:IEclipsePreferences.IPreferenceChangeListenerNotification that a preference value has changed in the preference store. The given event object describes the change details and must not benull.- Specified by:
preferenceChangein interfaceIEclipsePreferences.IPreferenceChangeListener- Parameters:
event- the event details- See Also:
-