Class CTabRendering
- All Implemented Interfaces:
IEclipsePreferences.IPreferenceChangeListener
,org.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A named preference for setting CTabFolder's to be rendered without icons in view areasstatic final boolean
Default value for "hide icons" preference for view tabsstatic final String
A named preference for setting CTabFolder's to show full text in view areasstatic final boolean
Default value for "show full text" preference for view tabsstatic final String
A named preference for setting CTabFolder's to be rendered with rounded cornersstatic final boolean
Default 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected Point
computeSize
(int part, int state, GC gc, int wHint, int hHint) Returns the preferred size of a part.protected Rectangle
computeTrim
(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 void
Draw a specifiedpart
of the CTabFolder using the providedbounds
andGC
.void
Notification that a preference value has changed in the preference store.void
setActive
(boolean active) void
setCornerRadius
(int radius) 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).void
setInnerKeyline
(Color color) void
setOuterKeyline
(Color color) void
setPadding
(int paddingLeft, int paddingRight, int paddingTop, int paddingBottom) void
setSelectedTabFill
(Color color) void
setSelectedTabFill
(Color[] colors, int[] percents) void
setSelectedTabHighlight
(Color color) void
setSelectedTabHighlightTop
(boolean drawTabHiglightOnTop) void
setTabOutline
(Color color) void
void
setUnselectedTabsColor
(Color color) void
setUnselectedTabsColor
(Color[] colors, int[] percents) Methods inherited from class org.eclipse.swt.custom.CTabFolderRenderer
dispose
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setUnselectedHotTabsColorBackground
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
computeTrim
Description copied from class:CTabFolderRenderer
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.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:
computeTrim
in 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:CTabFolderRenderer
Returns 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.DEFAULT
is passed for the hint.The
part
value 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
state
parameter may be one of the following:- SWT.NONE
- SWT.SELECTED - whether the part is selected
- Overrides:
computeSize
in 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:CTabFolderRenderer
Draw a specifiedpart
of the CTabFolder using the providedbounds
andGC
.The valid CTabFolder
part
constants 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
state
parameter 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:
draw
in 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:
setCornerRadius
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setOuterKeyline
- Specified by:
setOuterKeyline
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabHighlight
- Specified by:
setSelectedTabHighlight
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabFill
- Specified by:
setSelectedTabFill
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabFill
- Specified by:
setSelectedTabFill
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setUnselectedTabsColor
- Specified by:
setUnselectedTabsColor
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setUnselectedTabsColor
- Specified by:
setUnselectedTabsColor
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setTabOutline
- Specified by:
setTabOutline
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setInnerKeyline
- Specified by:
setInnerKeyline
in 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:
setDrawCustomTabContentBackground
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
setSelectedTabHighlightTop
public void setSelectedTabHighlightTop(boolean drawTabHiglightOnTop) - Specified by:
setSelectedTabHighlightTop
in interfaceorg.eclipse.e4.ui.internal.css.swt.ICTabRendering
-
preferenceChange
Description copied from interface:IEclipsePreferences.IPreferenceChangeListener
Notification that a preference value has changed in the preference store. The given event object describes the change details and must not benull
.- Specified by:
preferenceChange
in interfaceIEclipsePreferences.IPreferenceChangeListener
- Parameters:
event
- the event details- See Also:
-