Class CTabFolder
 The item children that may be added to instances of this class
 must be of type CTabItem.
 Control children are created and then set into a
 tab item using CTabItem#setControl.
 
 Note that although this class is a subclass of Composite,
 it does not make sense to set a layout on it.
 
IMPORTANT: This class is not intended to be subclassed.
- Styles:
- CLOSE, TOP, BOTTOM, FLAT, BORDER, SINGLE, MULTI
- Events:
- Selection
- "CTabFolder2"
Note: Only one of the styles TOP and BOTTOM may be specified.
Implementation Status:
Attributes, found in SWT, that are not supported
- simple (treated as true)
- Since:
- 1.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionintmarginHeight specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the form.intmarginWidth specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the form.
- 
Constructor SummaryConstructorsConstructorDescriptionCTabFolder(Composite parent, int style) Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCTabFolder2Listener(CTabFolder2Listener listener) Adds the listener to the collection of listeners who will be notified when a tab item is closed, minimized, maximized, restored, or to show the list of items that are not currently visible.voidaddSelectionListener(SelectionListener listener) Adds the listener to receive events.computeTrim(int x, int y, int width, int height) Given a desired client area for the receiver (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.<T> TgetAdapter(Class<T> adapter) Implementation of theAdaptableinterface.booleanReturnstrueif the receiver's border is visible.intReturns the receiver's border width.Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").getItem(int index) Return the tab that is located at the specified index.Gets the item at a point in the widget.intReturn the number of tabs in the folder.CTabItem[]getItems()Return the tab items.booleanReturnstrueif the receiver is maximized.booleanReturnstrueif the maximize button is visible.booleanReturnstrueif the receiver is minimized.booleanReturnstrueif the minimize button is visible.intReturns the number of characters that will appear in a fully compressed tab.booleanReturnstrueif the receiver displays most recently used tabs andfalseotherwise.Return the selected tab item, or null if there is no selection.Returns the receiver's selection background color.Returns the receiver's selection foreground color.intReturn the index of the selected tab item, or -1 if there is no selection.booleanReturnstrueif the CTabFolder only displays the selected tab andfalseif the CTabFolder displays multiple tabs.intgetStyle()Returns the receiver's style information.intReturns the height of the tabintReturns the position of the tab.Returns the control in the top right corner of the tab folder.intReturns the alignment of the top right control.booleanReturnstrueif the close button appears when the user hovers over an unselected tabs.booleanReturnstrueif an image appears in unselected tabs.intReturn the index of the specified tab or -1 if the tab is not in the receiver.voidremoveCTabFolder2Listener(CTabFolder2Listener listener) Removes the listener.voidremoveSelectionListener(SelectionListener listener) Removes the listener.voidreskin(int flags) Marks the widget to be skinned.voidsetBorderVisible(boolean show) Toggle the visibility of the bordervoidSets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.voidSets the layout which is associated with the receiver to be the argument which may be null.voidsetMaximized(boolean maximized) Sets the maximized state of the receiver.voidsetMaximizeVisible(boolean maximizeVisible) Marks the receiver's maximize button as visible if the argument istrue, and marks it invisible otherwise.voidsetMinimized(boolean minimized) Marks the receiver's minimize button as visible if the argument istrue, and marks it invisible otherwise.voidsetMinimizeVisible(boolean minimizeVisible) Marks the receiver's minimize button as visible if the argument istrue, and marks it invisible otherwise.voidsetMinimumCharacters(int minimumCharacters) Sets the minimum number of characters that will be displayed in a fully compressed tab.voidsetMRUVisible(boolean show) When there is not enough horizontal space to show all the tabs, by default, tabs are shown sequentially from left to right in order of their index.voidsetSelection(int index) Set the selection to the tab at the specified index.voidsetSelection(CTabItem item) Set the selection to the tab at the specified item.voidsetSelectionBackground(Color color) Sets the receiver's selection background color to the color specified by the argument, or to the default system color for the control if the argument is null.voidsetSelectionBackground(Color[] colors, int[] percents) Specify a gradient of colours to be draw in the background of the selected tab.voidsetSelectionBackground(Color[] colors, int[] percents, boolean vertical) Specify a gradient of colours to be draw in the background of the selected tab.voidsetSelectionBackground(Image image) Set the image to be drawn in the background of the selected tab.voidsetSelectionForeground(Color color) Set the foreground color of the selected tab.voidsetSingle(boolean single) Sets the number of tabs that the CTabFolder should displayvoidsetTabHeight(int height) Specify a fixed height for the tab items.voidsetTabPosition(int position) Specify whether the tabs should appear along the top of the folder or along the bottom of the folder.voidsetTopRight(Control control) Set the control that appears in the top right corner of the tab folder.voidsetTopRight(Control control, int alignment) Set the control that appears in the top right corner of the tab folder.voidsetUnselectedCloseVisible(boolean visible) Specify whether the close button appears when the user hovers over an unselected tabs.voidsetUnselectedImageVisible(boolean visible) Specify whether the image appears on unselected tabs.voidShows the item.voidShows the selection.Methods inherited from class org.eclipse.swt.widgets.Compositechanged, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabListMethods inherited from class org.eclipse.swt.widgets.ScrollablegetHorizontalBar, getVerticalBarMethods inherited from class org.eclipse.swt.widgets.ControladdControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addTouchListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCursor, setData, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, updateMethods inherited from class org.eclipse.swt.widgets.WidgetaddDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getListeners, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, toString
- 
Field Details- 
marginWidthpublic int marginWidthmarginWidth specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the form. The default value is 0.
- 
marginHeightpublic int marginHeightmarginHeight specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the form. The default value is 0.
 
- 
- 
Constructor Details- 
CTabFolderConstructs a new instance of this class given its parent and a style value describing its behavior and appearance.The style value is either one of the style constants defined in class SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.- Parameters:
- parent- a widget which will be the parent of the new instance (cannot be null)
- style- the style of widget to construct
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
 
- See Also:
 
 
- 
- 
Method Details- 
getItemsReturn the tab items.- Returns:
- the tab items
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
getItemReturn the tab that is located at the specified index.- Parameters:
- index- the index of the tab item
- Returns:
- the item at the specified index
- Throws:
- IllegalArgumentException-- ERROR_INVALID_RANGE - if the index is out of range
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
getItemGets the item at a point in the widget.- Parameters:
- pt- the point in coordinates relative to the CTabFolder
- Returns:
- the item at a point or null
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
- Since:
- 1.2
 
- 
getItemCountpublic int getItemCount()Return the number of tabs in the folder.- Returns:
- the number of tabs in the folder
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
indexOfReturn the index of the specified tab or -1 if the tab is not in the receiver.- Parameters:
- item- the tab item for which the index is required
- Returns:
- the index of the specified tab item or -1
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
setSelectionpublic void setSelection(int index) Set the selection to the tab at the specified index.- Parameters:
- index- the index of the tab item to be selected
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getSelectionIndexpublic int getSelectionIndex()Return the index of the selected tab item, or -1 if there is no selection.- Returns:
- the index of the selected tab item or -1
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
setSelectionSet the selection to the tab at the specified item.- Parameters:
- item- the tab item to be selected
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
getSelectionReturn the selected tab item, or null if there is no selection.- Returns:
- the selected tab item, or null if none has been selected
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
showSelectionpublic void showSelection()Shows the selection. If the selection is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the selection is visible.- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
- See Also:
 
- 
showItemShows the item. If the item is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the item is visible.- Parameters:
- item- the item to be shown
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the item is null
- ERROR_INVALID_ARGUMENT - if the item has been disposed
 
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
- See Also:
 
- 
setMRUVisiblepublic void setMRUVisible(boolean show) When there is not enough horizontal space to show all the tabs, by default, tabs are shown sequentially from left to right in order of their index. When the MRU visibility is turned on, the tabs that are visible will be the tabs most recently selected. Tabs will still maintain their left to right order based on index but only the most recently selected tabs are visible.For example, consider a CTabFolder that contains "Tab 1", "Tab 2", "Tab 3" and "Tab 4" (in order by index). The user selects "Tab 1" and then "Tab 3". If the CTabFolder is now compressed so that only two tabs are visible, by default, "Tab 2" and "Tab 3" will be shown ("Tab 3" since it is currently selected and "Tab 2" because it is the previous item in index order). If MRU visibility is enabled, the two visible tabs will be "Tab 1" and "Tab 3" (in that order from left to right). - Parameters:
- show- the new visibility state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getMRUVisiblepublic boolean getMRUVisible()Returnstrueif the receiver displays most recently used tabs andfalseotherwise.When there is not enough horizontal space to show all the tabs, by default, tabs are shown sequentially from left to right in order of their index. When the MRU visibility is turned on, the tabs that are visible will be the tabs most recently selected. Tabs will still maintain their left to right order based on index but only the most recently selected tabs are visible. For example, consider a CTabFolder that contains "Tab 1", "Tab 2", "Tab 3" and "Tab 4" (in order by index). The user selects "Tab 1" and then "Tab 3". If the CTabFolder is now compressed so that only two tabs are visible, by default, "Tab 2" and "Tab 3" will be shown ("Tab 3" since it is currently selected and "Tab 2" because it is the previous item in index order). If MRU visibility is enabled, the two visible tabs will be "Tab 1" and "Tab 3" (in that order from left to right). - Returns:
- the receiver's header's visibility state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setMaximizeVisiblepublic void setMaximizeVisible(boolean maximizeVisible) Marks the receiver's maximize button as visible if the argument istrue, and marks it invisible otherwise.- Parameters:
- maximizeVisible- the new visibility state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getMaximizeVisiblepublic boolean getMaximizeVisible()Returnstrueif the maximize button is visible.- Returns:
- the visibility of the maximized button
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setMinimizeVisiblepublic void setMinimizeVisible(boolean minimizeVisible) Marks the receiver's minimize button as visible if the argument istrue, and marks it invisible otherwise.- Parameters:
- minimizeVisible- the new visibility state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getMinimizeVisiblepublic boolean getMinimizeVisible()Returnstrueif the minimize button is visible.- Returns:
- the visibility of the minimized button
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setMinimizedpublic void setMinimized(boolean minimized) Marks the receiver's minimize button as visible if the argument istrue, and marks it invisible otherwise.- Parameters:
- minimized- the new visibility state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getMinimizedpublic boolean getMinimized()Returnstrueif the receiver is minimized.- Returns:
- the receiver's minimized state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setMaximizedpublic void setMaximized(boolean maximized) Sets the maximized state of the receiver.- Parameters:
- maximized- the new maximized state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getMaximizedpublic boolean getMaximized()Returnstrueif the receiver is maximized.- Returns:
- the receiver's maximized state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setLayoutSets the layout which is associated with the receiver to be the argument which may be null.Note: No Layout can be set on this Control because it already manages the size and position of its children. - Overrides:
- setLayoutin class- Composite
- Parameters:
- layout- the receiver's new layout or null
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setTabHeightpublic void setTabHeight(int height) Specify a fixed height for the tab items. If no height is specified, the default height is the height of the text or the image, whichever is greater. Specifying a height of -1 will revert to the default height.- Parameters:
- height- the pixel value of the height or -1
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- ERROR_INVALID_ARGUMENT - if called with a height of less than 0
 
 
- 
getTabHeightpublic int getTabHeight()Returns the height of the tab- Returns:
- the height of the tab
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
getMinimumCharacterspublic int getMinimumCharacters()Returns the number of characters that will appear in a fully compressed tab.- Returns:
- number of characters that will appear in a fully compressed tab
 
- 
setMinimumCharacterspublic void setMinimumCharacters(int minimumCharacters) Sets the minimum number of characters that will be displayed in a fully compressed tab.- Parameters:
- minimumCharacters- the minimum number of characters that will be displayed in a fully compressed tab
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- ERROR_INVALID_RANGE - if the count is less than zero
 
 
- 
getStylepublic int getStyle()Description copied from class:WidgetReturns the receiver's style information.Note that the value which is returned by this method may not match the value which was provided to the constructor when the receiver was created. This can occur when the underlying operating system does not support a particular combination of requested styles. For example, if the platform widget used to implement a particular SWT widget always has scroll bars, the result of calling this method would always have the SWT.H_SCROLLandSWT.V_SCROLLbits set.
- 
getSinglepublic boolean getSingle()Returnstrueif the CTabFolder only displays the selected tab andfalseif the CTabFolder displays multiple tabs.- Returns:
- trueif the CTabFolder only displays the selected tab and- falseif the CTabFolder displays multiple tabs
 
- 
setSinglepublic void setSingle(boolean single) Sets the number of tabs that the CTabFolder should display- Parameters:
- single-- trueif only the selected tab should be displayed otherwise, multiple tabs will be shown.
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getTabPositionpublic int getTabPosition()Returns the position of the tab. Possible values are SWT.TOP or SWT.BOTTOM.- Returns:
- the position of the tab
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
setTabPositionpublic void setTabPosition(int position) Specify whether the tabs should appear along the top of the folder or along the bottom of the folder.- Parameters:
- position-- SWT.TOPfor tabs along the top or- SWT.BOTTOMfor tabs along the bottom
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- ERROR_INVALID_ARGUMENT - if the position value is not either SWT.TOP or SWT.BOTTOM
 
 
- 
getBorderVisiblepublic boolean getBorderVisible()Returnstrueif the receiver's border is visible.- Returns:
- the receiver's border visibility state
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setBorderVisiblepublic void setBorderVisible(boolean show) Toggle the visibility of the border- Parameters:
- show- true if the border should be displayed
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getUnselectedImageVisiblepublic boolean getUnselectedImageVisible()Returnstrueif an image appears in unselected tabs.- Returns:
- trueif an image appears in unselected tabs
- Since:
- 1.3
 
- 
setUnselectedImageVisiblepublic void setUnselectedImageVisible(boolean visible) Specify whether the image appears on unselected tabs.- Parameters:
- visible-- truemakes the image appear
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
- Since:
- 1.3
 
- 
getUnselectedCloseVisiblepublic boolean getUnselectedCloseVisible()Returnstrueif the close button appears when the user hovers over an unselected tabs.- Returns:
- trueif the close button appears on unselected tabs
 
- 
setUnselectedCloseVisiblepublic void setUnselectedCloseVisible(boolean visible) Specify whether the close button appears when the user hovers over an unselected tabs.- Parameters:
- visible-- truemakes the close button appear
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
computeTrimDescription copied from class:ScrollableGiven a desired client area for the receiver (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 receiver's bounds were set to that rectangle, the area of the receiver 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 class- Scrollable
- Parameters:
- x- the desired x coordinate of the client area
- y- the desired y coordinate of the client area
- width- the desired width of the client area
- height- the desired height of the client area
- Returns:
- the required bounds to produce the given client area
- See Also:
 
- 
setSelectionBackgroundSets the receiver's selection background color to the color specified by the argument, or to the default system color for the control if the argument is null.- Parameters:
- color- the new color (or null)
- Throws:
- IllegalArgumentException-- ERROR_INVALID_ARGUMENT - if the argument has been disposed
 
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getSelectionBackgroundReturns the receiver's selection background color.- Returns:
- the selection background color of the receiver
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setSelectionBackgroundSpecify a gradient of colours to be draw in the background of the selected tab. For example to draw a gradient that varies from dark blue to blue and then to white, use the following call to setBackground:cfolder.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_DARK_BLUE), display.getSystemColor(SWT.COLOR_BLUE), display.getSystemColor(SWT.COLOR_WHITE), display.getSystemColor(SWT.COLOR_WHITE)}, new int[] {25, 50, 100});- Parameters:
- colors- an array of Color that specifies the colors to appear in the gradient in order of appearance left to right. The value- nullclears the background gradient.
- percents- an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change. The size of the percents array must be one less than the size of the colors array.
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
- Since:
- 1.3
 
- 
setSelectionBackgroundSpecify a gradient of colours to be draw in the background of the selected tab. For example to draw a vertical gradient that varies from dark blue to blue and then to white, use the following call to setBackground:cfolder.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_DARK_BLUE), display.getSystemColor(SWT.COLOR_BLUE), display.getSystemColor(SWT.COLOR_WHITE), display.getSystemColor(SWT.COLOR_WHITE)}, new int[] {25, 50, 100}, true);- Parameters:
- colors- an array of Color that specifies the colors to appear in the gradient in order of appearance top to bottom. The value- nullclears the background gradient.
- percents- an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change. The size of the percents array must be one less than the size of the colors array.
- vertical- indicate the direction of the gradient. True is vertical and false is horizontal.
- Throws:
- IllegalArgumentException-- ERROR_INVALID_ARGUMENT - if the argument has been disposed
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
- Since:
- 1.3
 
- 
setSelectionBackgroundSet the image to be drawn in the background of the selected tab. Image is stretched or compressed to cover entire selection tab area.- Parameters:
- image- the image to be drawn in the background
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
- Since:
- 1.3
 
- 
setSelectionForegroundSet the foreground color of the selected tab.- Parameters:
- color- the color of the text displayed in the selected tab
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
getSelectionForegroundReturns the receiver's selection foreground color.- Returns:
- the selection foreground color of the receiver
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
 
 
- 
setTopRightSet the control that appears in the top right corner of the tab folder. Typically this is a close button or a composite with a Menu and close button. The topRight control is optional. Setting the top right control to null will remove it from the tab folder.- Parameters:
- control- the control to be displayed in the top right corner or null
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- ERROR_INVALID_ARGUMENT - if the control is not a child of this CTabFolder
 
 
- 
setTopRightSet the control that appears in the top right corner of the tab folder. Typically this is a close button or a composite with a Menu and close button. The topRight control is optional. Setting the top right control to null will remove it from the tab folder.The alignment parameter sets the layout of the control in the tab area. SWT.RIGHTwill cause the control to be positioned on the far right of the folder and it will have its default size.SWT.FILLwill size the control to fill all the available space to the right of the last tab. If there is no available space, the control will not be visible.- Parameters:
- control- the control to be displayed in the top right corner or null
- alignment-- SWT.RIGHTor- SWT.FILL
- Throws:
- SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- ERROR_INVALID_ARGUMENT - if the control is not a child of this CTabFolder
 
 
- 
getTopRightReturns the control in the top right corner of the tab folder. Typically this is a close button or a composite with a menu and close button.- Returns:
- the control in the top right corner of the tab folder or null
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
getTopRightAlignmentpublic int getTopRightAlignment()Returns the alignment of the top right control.- Returns:
- the alignment of the top right control which is either
 SWT.RIGHTorSWT.FILL
- Throws:
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
- Since:
- 1.3
 
- 
getAdapterDescription copied from class:WidgetImplementation of theAdaptableinterface.IMPORTANT: This method is not part of the RWT public API. It is marked public only so that it can be shared within the packages provided by RWT. It should never be accessed from application code. - Specified by:
- getAdapterin interface- Adaptable
- Overrides:
- getAdapterin class- Composite
- Parameters:
- adapter- the lookup class
- Returns:
- an object that can be cast to the given class or nullif there is no adapter associated with the given class.
 
- 
setFontDescription copied from class:ControlSets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
- 
getBorderWidthpublic int getBorderWidth()Description copied from class:ControlReturns the receiver's border width. Note: When the theming defines different border widths for the four edges, this method returns the maximum border width.- Overrides:
- getBorderWidthin class- Control
- Returns:
- the border width
 
- 
getClientAreaDescription copied from class:ScrollableReturns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").- Overrides:
- getClientAreain class- Scrollable
- Returns:
- the client area
- See Also:
 
- 
addSelectionListenerAdds the listener to receive events.- Parameters:
- listener- the listener
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
removeSelectionListenerRemoves the listener.- Parameters:
- listener- the listener
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
 
- 
addCTabFolder2ListenerAdds the listener to the collection of listeners who will be notified when a tab item is closed, minimized, maximized, restored, or to show the list of items that are not currently visible.- Parameters:
- listener- the listener which should be notified
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
- See Also:
 
- 
removeCTabFolder2ListenerRemoves the listener.- Parameters:
- listener- the listener
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
 
- See Also:
 
- 
reskinpublic void reskin(int flags) Description copied from class:WidgetMarks the widget to be skinned.The skin event is sent to the receiver's display when appropriate (usually before the next event is handled). Widgets are automatically marked for skinning upon creation as well as when its skin id or class changes. The skin id and/or class can be changed by calling Display.setData(String, Object)with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it will not be sent again unlessreskin(int)is called on the widget or on an ancestor while specifying theSWT.ALLflag.The parameter flagsmay be either:- SWT.ALL
- all children in the receiver's widget tree should be skinned
- SWT.NONE
- only the receiver should be skinned
 
 
-