|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JTabbedPane com.jidesoft.swing.JideTabbedPane
public class JideTabbedPane
JideTabbedPane
is an enhanced version of JTabbedPane
. Different from
JTabbedPane
, it
JideTabbedPane
is the same as JTabbedPane
.
Nested Class Summary | |
---|---|
static interface |
JideTabbedPane.ColorProvider
An interface to provide colors for tab background and foreground. |
static interface |
JideTabbedPane.GradientColorProvider
A ColorProvider that can supports gradient tab background. |
protected class |
JideTabbedPane.IgnoreableSingleSelectionModel
|
class |
JideTabbedPane.NoFocusButton
|
protected class |
JideTabbedPane.PageLastFocusTracker
|
static class |
JideTabbedPane.TabListCellRenderer
The default tab list cell renderer used to renderer the list in the popup when tab list button is pressed. |
Nested classes/interfaces inherited from class javax.swing.JTabbedPane |
---|
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected PropertyChangeListener |
_focusChangeListener
|
protected boolean |
_tabEditingAllowed
|
protected TabEditingValidator |
_tabEditValidator
|
static String |
BOLDACTIVETAB_PROPERTY
Bound property name for if the active tab title is in bold |
static String |
BOX_STYLE_PROPERTY
Bound property name for box style |
static int |
BUTTON_CLOSE
|
static int |
BUTTON_EAST
|
static int |
BUTTON_LIST
|
static int |
BUTTON_NORTH
|
static int |
BUTTON_SOUTH
|
static int |
BUTTON_WEST
|
static int |
COLOR_THEME_DEFAULT
color style |
static int |
COLOR_THEME_OFFICE2003
|
static int |
COLOR_THEME_VSNET
|
static int |
COLOR_THEME_WIN2K
|
static int |
COLOR_THEME_WINXP
|
static String |
GRIPPER_PROPERTY
Bound property name for gripper. |
static String |
HIDE_IF_ONE_TAB_PROPERTY
Bound property name for hide tab area if there is only one tab. |
static JideTabbedPane.ColorProvider |
ONENOTE_COLOR_PROVIDER
|
static String |
PROPERTY_COLOR_THEME
|
static String |
PROPERTY_CONTENT_BORDER_INSETS
|
static String |
PROPERTY_DRAG_OVER_DISABLED
|
static String |
PROPERTY_SELECTED_INDEX
|
static String |
PROPERTY_SHOW_CLOSE_BUTTON_ON_MOUSE_OVER
|
static String |
PROPERTY_TAB_AREA_INSETS
|
static String |
PROPERTY_TAB_COLOR_PROVIDER
|
static String |
PROPERTY_TAB_INSETS
|
static String |
PROPERTY_TAB_LEADING_COMPONENT
|
static String |
PROPERTY_TAB_RESIZE_MODE
|
static String |
PROPERTY_TAB_SHAPE
|
static String |
PROPERTY_TAB_TRAILING_COMPONENT
|
static int |
RESIZE_MODE_COMPRESSED
A tab resize mode. |
static int |
RESIZE_MODE_DEFAULT
A tab resize mode. |
static int |
RESIZE_MODE_FIT
A tab resize mode. |
static int |
RESIZE_MODE_FIXED
A tab resize mode. |
static int |
RESIZE_MODE_NONE
A tab resize mode. |
static String |
SCROLL_TAB_ON_WHEEL_PROPERTY
|
static int |
SHAPE_BOX
|
static int |
SHAPE_DEFAULT
|
static int |
SHAPE_ECLIPSE
|
static int |
SHAPE_ECLIPSE3X
|
static int |
SHAPE_EXCEL
|
static int |
SHAPE_FLAT
|
static int |
SHAPE_OFFICE2003
|
static int |
SHAPE_ROUNDED_FLAT
|
static int |
SHAPE_ROUNDED_VSNET
|
static int |
SHAPE_VSNET
|
static int |
SHAPE_WINDOWS
|
static int |
SHAPE_WINDOWS_SELECTED
|
static String |
SHOW_CLOSE_BUTTON_ON_TAB_PROPERTY
Bound property name for if showing close button on tab |
static String |
SHOW_CLOSE_BUTTON_PROPERTY
Bound property name for if showing close button |
static String |
SHOW_ICONS_PROPERTY
Bound property name for show icons on tab |
static String |
SHOW_TAB_AREA_PROPERTY
Bound property name for if the tab area is visible. |
static String |
SHOW_TAB_BUTTONS_PROPERTY
Bound property name for show tab button. |
static String |
SHOW_TAB_CONTENT_PROPERTY
Bound property name for if the tab area is visible. |
static String |
SHRINK_TAB_PROPERTY
Bound property name for shrink tabs. |
static String |
TAB_CLOSABLE_PROPERTY
Bound property name for tab closable. |
static String |
USE_DEFAULT_SHOW_CLOSE_BUTTON_ON_TAB_PROPERTY
Bound property name for using default show close button on tab value from UIDefaults |
static String |
USE_DEFAULT_SHOW_ICONS_PROPERTY
Bound property name for using default show icons on tab value from UIDefaults |
Fields inherited from class javax.swing.JTabbedPane |
---|
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JideTabbedPane()
Creates an empty TabbedPane with a default tab placement of JTabbedPane.TOP . |
|
JideTabbedPane(int tabPlacement)
Creates an empty TabbedPane with the specified tab placement of either:
JTabbedPane.TOP , JTabbedPane.BOTTOM , JTabbedPane.LEFT , or
JTabbedPane.RIGHT . |
|
JideTabbedPane(int tabPlacement,
int tabLayoutPolicy)
Creates an empty JideTabbedPane with the specified tab placement and tab layout policy. |
Method Summary | |
---|---|
Component |
add(Component component)
|
void |
addNotify()
|
void |
addTabEditingListener(TabEditingListener l)
Adds a TabEditingListener to this tabbedpane. |
protected Point |
calculateTabListPopupPosition(JButton listButton)
Calculates the position where the tab list popup is to be displayed based on the list button being clicked. |
void |
cancelTabEditing()
|
protected void |
clearVisComp()
|
protected PropertyChangeListener |
createFocusChangeListener()
|
JideTabbedPane.NoFocusButton |
createNoFocusButton(int type)
Creates no focus buttons for JideTabbedPane. |
protected JList |
createTabList(Insets insets)
Creates the tab list. |
protected JidePopup |
createTabListPopup()
Creates tab list popup. |
void |
editTabAt(int tabIndex)
Starts tab editing. |
protected void |
fireStateChanged()
|
protected void |
fireTabEditing(int id,
int index,
String oldTitle,
String newTitle)
|
Action |
getCloseAction()
Gets close action. |
int |
getColorTheme()
|
Insets |
getContentBorderInsets()
|
int |
getDefaultColorTheme()
|
int |
getDefaultTabResizeMode()
|
int |
getDefaultTabStyle()
|
String |
getDisplayTitleAt(int index)
Gets the display title. |
int |
getEditingTabIndex()
|
Icon |
getIconForTab(int tabIndex)
Gets the icon for the tab after looking at the UIDefault "JideTabbedPane.showIconOnTab" and isShowIconsOnTab() . |
Component |
getLastFocusedComponent(Component pageComponent)
Gets the last focused component of a particular page. |
protected Hashtable |
getPageLastFocusTrackers()
|
String |
getResourceString(String key)
Gets the resource string used in JideTabbedPane. |
Font |
getSelectedTabFont()
Gets the font for selected tab. |
StringConverter |
getStringConverter()
Gets the string converter that converts the tab title to the display title. |
int |
getTabAlignment()
Returns the alignment of the tabs for this tabbed pane. |
Insets |
getTabAreaInsets()
|
int |
getTabAtLocation(int x,
int y)
|
JideTabbedPane.ColorProvider |
getTabColorProvider()
Gets the tab color provider. |
TabEditingListener[] |
getTabEditingListeners()
Returns an array of all the TabEditingListener s added to this JTabbedPane with
addTabEditingListener . |
TabEditingValidator |
getTabEditingValidator()
|
int |
getTabHeight()
Gets tab height. |
Insets |
getTabInsets()
|
Component |
getTabLeadingComponent()
|
ListCellRenderer |
getTabListCellRenderer()
Gets the tab list cell renderer. |
int |
getTabResizeMode()
|
int |
getTabShape()
|
Component |
getTabTrailingComponent()
|
TabbedPaneUI |
getUI()
Returns the UI object which implements the L&F for this component. |
String |
getUIClassID()
Returns the name of the UI class that implements the L&F for this component. |
boolean |
hasFocusComponent()
Checks if the JideTabbedPane has the focus component. |
void |
hideTabListPopup()
Hides the tab list popup if it's visible. |
void |
insertTab(String title,
Icon icon,
Component component,
String tip,
int index)
Overridden to add a PageLastFocusTracker to each page, used to update the page's last focused
component. |
boolean |
isAutoFocusOnTabHideClose()
|
boolean |
isAutoRequestFocus()
Checks if the UI should automatically request focus on selected component when doing the layout. |
boolean |
isBoldActiveTab()
If the active tab is in bold. |
boolean |
isCloseTabOnMouseMiddleButton()
Get the flag if clicking middle mouse button can close the tab. |
boolean |
isDragOverDisabled()
Checks the dragOverDisabled property. |
boolean |
isHideOneTab()
Checks if tab area will be hidden if there is only one tab. |
boolean |
isHideTrailingWhileNoButtons()
Get the flag that if the trailing component should be hidden while no buttons are visible. |
boolean |
isLayoutTrailingComponentBeforeButtons()
Gets the flag indicating if the trailing component should be layout before the default buttons. |
boolean |
isRightClickSelect()
Returns true if you want right click on unselected tab will select that tab. |
boolean |
isScrollSelectedTabOnWheel()
Checks if the selected tab will be changed on mouse wheel event. |
boolean |
isShowCloseButton()
If close button is visible. |
boolean |
isShowCloseButtonOnMouseOver()
Gets the flag indicating if the close button should only be displayed when the mouse is over the tab. |
boolean |
isShowCloseButtonOnSelectedTab()
|
boolean |
isShowCloseButtonOnTab()
Checks if the close button will be shown on tab. |
boolean |
isShowGripper()
If the grip is visible. |
boolean |
isShowIconsOnTab()
Checks if the icon will be shown on tab. |
boolean |
isShowTabArea()
If the tab area is visible. |
boolean |
isShowTabButtons()
Checks if tab buttons are always visible. |
boolean |
isShowTabContent()
If the tab content is visible. |
boolean |
isSuppressSetSelectedIndex()
|
boolean |
isSuppressStateChangedEvents()
|
boolean |
isTabClosableAt(int tabIndex)
Checks if the tab at tabIndex should show the close button. |
boolean |
isTabEditing()
Checks if tab is in editing mode. |
boolean |
isTabEditingAllowed()
Checks if the tab editing is allowed. |
boolean |
isTabListPopupVisible()
Checks if the tab list popup is visible. |
boolean |
isTabShown()
Checks if tab area is shown. |
boolean |
isUseDefaultShowCloseButtonOnTab()
If the return is true, the value set to setShowCloseButtonOnTab() will be ignored. |
boolean |
isUseDefaultShowIconsOnTab()
If the return is true, the value set to setShowIconsOnTab() will be ignored. |
void |
moveSelectedTabTo(int tabIndex)
Moves selected tab from current position to the position specified in tabIndex. |
void |
popupSelectedIndex(int index)
|
void |
processMouseSelection(int tabIndex,
MouseEvent e)
|
void |
removeNotify()
|
void |
removeTabAt(int index)
|
void |
removeTabEditingListener(TabEditingListener l)
Removes a TabEditingListener from this tabbedpane. |
protected void |
repaintContentBorder(int x,
int y,
int width,
int height)
Calls repaint on the specified rectangular area. |
void |
repaintTabAreaAndContentBorder()
Repaints the tab area and the content border if any. |
boolean |
requestFocusForVisibleComponent()
|
void |
resetDefaultCloseAction()
Resets close action to default. |
void |
scrollSelectedTabToVisible(boolean scrollLeft)
Scroll the selected tab visible in case the tab is outside of the viewport. |
void |
setAutoFocusOnTabHideClose(boolean autoFocusonTabHideClose)
|
void |
setAutoRequestFocus(boolean autoRequestFocus)
|
void |
setBoldActiveTab(boolean boldActiveTab)
Sets if the active tab is in bold. |
void |
setCloseAction(Action action)
Sets default close action for close button. |
void |
setCloseTabOnMouseMiddleButton(boolean closeTabOnMouseMiddleButton)
Set the flag if clicking middle mouse button can close the tab. |
void |
setColorTheme(int colorTheme)
|
void |
setComponentAt(int index,
Component c)
|
void |
setContentBorderInsets(Insets contentBorderInsets)
Sets the content border insets. |
void |
setDragOverDisabled(boolean dragOverDisabled)
Sets the dragOverDisabled property. |
void |
setHideOneTab(boolean hideOne)
Sets the value if tab area will be hidden if there is only one tab. |
void |
setHideTrailingWhileNoButtons(boolean hideTrailingWhileNoButtons)
Set the flag that if the trailing component should be hidden while no buttons are visible. |
void |
setLayoutTrailingComponentBeforeButtons(boolean layoutTrailingComponentBeforeButtons)
Sets the flag indicating if the trailing component should be layout before the default buttons. |
void |
setRightClickSelect(boolean rightClickSelect)
Sets if you want right click on unselected tab will select that tab. |
void |
setScrollSelectedTabOnWheel(boolean scrollSelectedTabOnWheel)
If true, the selected tab will be changed on mouse wheel. |
void |
setSelectedIndex(int index)
|
void |
setSelectedTabFont(Font selectedTabFont)
Sets the font for selected tab. |
void |
setShowCloseButton(boolean showCloseButton)
Sets if the close button is visible. |
void |
setShowCloseButtonOnMouseOver(boolean showCloseButtonOnMouseOverOnly)
Sets the flag indicating if the close button should only be displayed when the mouse is over the tab. |
void |
setShowCloseButtonOnSelectedTab(boolean i)
Shows the close button on the selected tab only. |
void |
setShowCloseButtonOnTab(boolean showCloseButtonOnTab)
Sets to true if the close button will be shown on tab. |
void |
setShowGripper(boolean showGripper)
Sets the visibility of grip. |
void |
setShowIconsOnTab(boolean showIconsOnTab)
Sets to true if the icon will be shown on tab. |
void |
setShowTabArea(boolean showTabArea)
Sets if the tab area is visible. |
void |
setShowTabButtons(boolean showButtons)
Sets the value if tab buttons are always visible. |
void |
setShowTabContent(boolean showTabContent)
Sets if the tab content is visible. |
void |
setStringConverter(StringConverter stringConverter)
Sets the string converter. |
void |
setSuppressSetSelectedIndex(boolean suppressSetSelectedIndex)
|
void |
setSuppressStateChangedEvents(boolean suppress)
|
void |
setTabAlignment(int tabAlignment)
Sets the tab alignment for the tabs of a tabbed pane. |
void |
setTabAreaInsets(Insets tabAreaInsets)
Sets the tab area insets. |
void |
setTabClosableAt(int tabIndex,
boolean closable)
Checks if the tab at tabIndex should show the close button. |
void |
setTabColorProvider(JideTabbedPane.ColorProvider tabColorProvider)
Sets the tab color provider.It allows you to set the background color of each tab. |
void |
setTabEditingAllowed(boolean allowed)
Sets the value if the tab editing is allowed. |
void |
setTabEditingValidator(TabEditingValidator tabEditValidator)
|
void |
setTabInsets(Insets tabInsets)
Sets the tab insets. |
void |
setTabLeadingComponent(Component component)
Sets the tab leading component. |
void |
setTabListCellRenderer(ListCellRenderer tabListCellRenderer)
Sets the tab list cell renderer. |
void |
setTabResizeMode(int resizeMode)
Sets the tab resize mode. |
void |
setTabShape(int tabShape)
|
void |
setTabTrailingComponent(Component component)
Sets the tab trailing component. |
void |
setUI(TabbedPaneUI ui)
Sets the UI object which implements the L&F for this component. |
void |
setUseDefaultShowCloseButtonOnTab(boolean useDefaultShowCloseButtonOnTab)
Set if use the default value from UIDefaults. |
void |
setUseDefaultShowIconsOnTab(boolean useDefaultShowIconsOnTab)
Set if use the default value from UIDefaults. |
void |
showTabListPopup(JButton listButton)
Shows the tab list popup by clicking on the list button. |
void |
stopTabEditing()
|
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SHRINK_TAB_PROPERTY
public static final String HIDE_IF_ONE_TAB_PROPERTY
public static final String SHOW_TAB_BUTTONS_PROPERTY
public static final String BOX_STYLE_PROPERTY
public static final String SHOW_ICONS_PROPERTY
public static final String USE_DEFAULT_SHOW_ICONS_PROPERTY
public static final String SHOW_CLOSE_BUTTON_ON_TAB_PROPERTY
public static final String SHOW_CLOSE_BUTTON_PROPERTY
public static final String SHOW_TAB_AREA_PROPERTY
public static final String SHOW_TAB_CONTENT_PROPERTY
public static final String TAB_CLOSABLE_PROPERTY
public static final String USE_DEFAULT_SHOW_CLOSE_BUTTON_ON_TAB_PROPERTY
public static final String BOLDACTIVETAB_PROPERTY
public static final String GRIPPER_PROPERTY
public static final String PROPERTY_TAB_SHAPE
public static final String PROPERTY_COLOR_THEME
public static final String PROPERTY_TAB_RESIZE_MODE
public static final String PROPERTY_TAB_LEADING_COMPONENT
public static final String PROPERTY_TAB_TRAILING_COMPONENT
public static final String PROPERTY_TAB_COLOR_PROVIDER
public static final String PROPERTY_CONTENT_BORDER_INSETS
public static final String PROPERTY_TAB_AREA_INSETS
public static final String PROPERTY_TAB_INSETS
public static final String PROPERTY_DRAG_OVER_DISABLED
public static final String SCROLL_TAB_ON_WHEEL_PROPERTY
public static final String PROPERTY_SELECTED_INDEX
public static final String PROPERTY_SHOW_CLOSE_BUTTON_ON_MOUSE_OVER
public static final int BUTTON_CLOSE
public static final int BUTTON_EAST
public static final int BUTTON_WEST
public static final int BUTTON_NORTH
public static final int BUTTON_SOUTH
public static final int BUTTON_LIST
public static final int RESIZE_MODE_DEFAULT
getDefaultTabResizeMode()
which is defined in UIDefault "JideTabbedPane.defaultResizeMode". You can change this
in UIDefault. It will affect the resize mode of all JideTabbedPane
s.
public static final int RESIZE_MODE_NONE
public static final int RESIZE_MODE_FIT
public static final int RESIZE_MODE_FIXED
public static final int RESIZE_MODE_COMPRESSED
public static final int COLOR_THEME_DEFAULT
public static final int COLOR_THEME_WIN2K
public static final int COLOR_THEME_OFFICE2003
public static final int COLOR_THEME_VSNET
public static final int COLOR_THEME_WINXP
public static final int SHAPE_DEFAULT
public static final int SHAPE_WINDOWS
public static final int SHAPE_VSNET
public static final int SHAPE_BOX
public static final int SHAPE_OFFICE2003
public static final int SHAPE_FLAT
public static final int SHAPE_ECLIPSE
public static final int SHAPE_ECLIPSE3X
public static final int SHAPE_EXCEL
public static final int SHAPE_ROUNDED_VSNET
public static final int SHAPE_ROUNDED_FLAT
public static final int SHAPE_WINDOWS_SELECTED
protected transient boolean _tabEditingAllowed
protected transient TabEditingValidator _tabEditValidator
public static JideTabbedPane.ColorProvider ONENOTE_COLOR_PROVIDER
protected PropertyChangeListener _focusChangeListener
Constructor Detail |
---|
public JideTabbedPane()
TabbedPane
with a default tab placement of JTabbedPane.TOP
.
JTabbedPane.addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String)
public JideTabbedPane(int tabPlacement)
TabbedPane
with the specified tab placement of either:
JTabbedPane.TOP
, JTabbedPane.BOTTOM
, JTabbedPane.LEFT
, or
JTabbedPane.RIGHT
.
tabPlacement
- the placement for the tabs relative to the contentJTabbedPane.addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String)
public JideTabbedPane(int tabPlacement, int tabLayoutPolicy)
JideTabbedPane
with the specified tab placement and tab layout policy. Tab
placement may be either: JTabbedPane.TOP
or JTabbedPane.BOTTOM
Tab layout policy should
always be JTabbedPane.SCROLL_TAB_LAYOUT
. JTabbedPane
also supports
JTabbedPane.WRAP_TAB_LAYOUT
. However the style of tabs in JideTabbedPane
doesn't match
with JTabbedPane.WRAP_TAB_LAYOUT
very well, so we decided not to support it.
tabPlacement
- the placement for the tabs relative to the contenttabLayoutPolicy
- the policy for laying out tabs when all tabs will not fit on one run
IllegalArgumentException
- if tab placement or tab layout policy are not one of the above supported valuesJTabbedPane.addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String)
Method Detail |
---|
public TabbedPaneUI getUI()
getUI
in class JTabbedPane
TabbedPaneUI
objectsetUI(javax.swing.plaf.TabbedPaneUI)
public void setUI(TabbedPaneUI ui)
setUI
in class JTabbedPane
ui
- the new UI objectUIDefaults.getUI(javax.swing.JComponent)
public void updateUI()
updateUI
in class JTabbedPane
JComponent.updateUI()
public String getUIClassID()
getUIClassID
in class JTabbedPane
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
public boolean isHideOneTab()
public void setHideOneTab(boolean hideOne)
hideOne
- true to hide tab areas if there is only one tab; false otherwise.public boolean isTabShown()
public boolean isShowTabButtons()
public void setShowTabButtons(boolean showButtons)
showButtons
- true to always show tab buttons; false otherwise.public void setCloseAction(Action action)
action
- the close action.public Action getCloseAction()
public void setAutoFocusOnTabHideClose(boolean autoFocusonTabHideClose)
public boolean isAutoFocusOnTabHideClose()
public void resetDefaultCloseAction()
public void setSuppressStateChangedEvents(boolean suppress)
public boolean isSuppressStateChangedEvents()
protected void fireStateChanged()
fireStateChanged
in class JTabbedPane
public boolean isSuppressSetSelectedIndex()
public void setSuppressSetSelectedIndex(boolean suppressSetSelectedIndex)
public void setSelectedIndex(int index)
setSelectedIndex
in class JTabbedPane
public void popupSelectedIndex(int index)
public void setComponentAt(int index, Component c)
setComponentAt
in class JTabbedPane
public boolean isAutoRequestFocus()
public void setAutoRequestFocus(boolean autoRequestFocus)
public void moveSelectedTabTo(int tabIndex)
tabIndex
- new indexpublic boolean requestFocusForVisibleComponent()
public boolean isHideTrailingWhileNoButtons()
isShowTabArea()
,
isShowTabButtons()
,
setHideTrailingWhileNoButtons(boolean)
public void setHideTrailingWhileNoButtons(boolean hideTrailingWhileNoButtons)
hideTrailingWhileNoButtons
- the flagisHideTrailingWhileNoButtons()
public boolean isLayoutTrailingComponentBeforeButtons()
setLayoutTrailingComponentBeforeButtons(boolean)
public void setLayoutTrailingComponentBeforeButtons(boolean layoutTrailingComponentBeforeButtons)
layoutTrailingComponentBeforeButtons
- the flagpublic void processMouseSelection(int tabIndex, MouseEvent e)
public int getTabHeight()
public boolean isRightClickSelect()
public void setRightClickSelect(boolean rightClickSelect)
rightClickSelect
- true if right click on unselected tab will select that tabpublic int getTabAtLocation(int x, int y)
public boolean isShowGripper()
public void setShowGripper(boolean showGripper)
showGripper
- true to show grippublic boolean isShowIconsOnTab()
public void setShowIconsOnTab(boolean showIconsOnTab)
showIconsOnTab
- true or false.public boolean isUseDefaultShowIconsOnTab()
public void setUseDefaultShowIconsOnTab(boolean useDefaultShowIconsOnTab)
useDefaultShowIconsOnTab
- true or false.public boolean isShowCloseButtonOnTab()
public void setShowCloseButtonOnTab(boolean showCloseButtonOnTab)
showCloseButtonOnTab
- true or false.public boolean isUseDefaultShowCloseButtonOnTab()
public void setUseDefaultShowCloseButtonOnTab(boolean useDefaultShowCloseButtonOnTab)
useDefaultShowCloseButtonOnTab
- true or false.public void setTabEditingAllowed(boolean allowed)
allowed
- true or false.public boolean isTabEditingAllowed()
public void setTabEditingValidator(TabEditingValidator tabEditValidator)
public TabEditingValidator getTabEditingValidator()
public boolean isShowCloseButton()
public void setShowCloseButton(boolean showCloseButton)
showCloseButton
- true or false.public boolean isShowTabArea()
public void setShowTabArea(boolean showTabArea)
showTabArea
- true or false.public boolean isShowTabContent()
public void setShowTabContent(boolean showTabContent)
showTabContent
- true or false.public StringConverter getStringConverter()
public void setStringConverter(StringConverter stringConverter)
stringConverter
- the StringConverter.getStringConverter()
public String getDisplayTitleAt(int index)
index
- the index to display
public boolean isBoldActiveTab()
public void setBoldActiveTab(boolean boldActiveTab)
boldActiveTab
- the flagpublic void removeTabAt(int index)
removeTabAt
in class JTabbedPane
public boolean isTabClosableAt(int tabIndex)
tabIndex
- the tab index
IndexOutOfBoundsException
- if index is out of range (index < 0 || index >= tab count)public void setTabClosableAt(int tabIndex, boolean closable)
isShowCloseButtonOnTab()
return true.
tabIndex
- the tab indexclosable
- the flag indicating if the tab is closable
IndexOutOfBoundsException
- if index is out of range (index < 0 || index >= tab count)protected Hashtable getPageLastFocusTrackers()
public Component getLastFocusedComponent(Component pageComponent)
pageComponent
- the page component
protected void clearVisComp()
public void insertTab(String title, Icon icon, Component component, String tip, int index)
PageLastFocusTracker
to each page, used to update the page's last focused
component.
insertTab
in class JTabbedPane
public Font getSelectedTabFont()
public void setSelectedTabFont(Font selectedTabFont)
selectedTabFont
- new font for selected tab.public int getColorTheme()
public int getDefaultColorTheme()
public void setColorTheme(int colorTheme)
public int getTabResizeMode()
public void setTabResizeMode(int resizeMode)
RESIZE_MODE_DEFAULT
, RESIZE_MODE_NONE
,
RESIZE_MODE_FIT
, RESIZE_MODE_FIXED
and RESIZE_MODE_COMPRESSED
.
resizeMode
- the new resize mode.public int getDefaultTabResizeMode()
public int getTabShape()
public int getDefaultTabStyle()
public void setTabShape(int tabShape)
public void setTabLeadingComponent(Component component)
component
- the tab leading component
IllegalArgumentException
- if the component doesn't implement UIResource.public Component getTabLeadingComponent()
public void setTabTrailingComponent(Component component)
component
- the tab trailing component
IllegalArgumentException
- if the component doesn't implement UIResource.public Component add(Component component)
add
in class JTabbedPane
public Component getTabTrailingComponent()
public boolean isShowCloseButtonOnSelectedTab()
public void setShowCloseButtonOnSelectedTab(boolean i)
i
- the flag indicating if close button should be shown in the selected tabpublic boolean isShowCloseButtonOnMouseOver()
setShowCloseButtonOnMouseOver(boolean)
public void setShowCloseButtonOnMouseOver(boolean showCloseButtonOnMouseOverOnly)
showCloseButtonOnMouseOverOnly
- the flagpublic JideTabbedPane.ColorProvider getTabColorProvider()
public void setTabColorProvider(JideTabbedPane.ColorProvider tabColorProvider)
JTabbedPane.setBackgroundAt(int, java.awt.Color)
method is because this way queries the color. So it can
support unlimited number of tabs. When you don't know exactly how many tabs it will be, this way can still handle
it very well. There is ONENOTE_COLOR_PROVIDER
which provides the tab color as you see in Microsoft
OneNote 2003. You can also define your own ColorProvider to fit your application color theme.
tabColorProvider
- the tab color providerpublic void editTabAt(int tabIndex)
setTabEditingAllowed(boolean)
is set to true.
tabIndex
- the index of the tabpublic boolean isTabEditing()
public void stopTabEditing()
public void cancelTabEditing()
public int getEditingTabIndex()
protected PropertyChangeListener createFocusChangeListener()
public void repaintTabAreaAndContentBorder()
protected void repaintContentBorder(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightpublic void addNotify()
addNotify
in class JComponent
public void removeNotify()
removeNotify
in class JComponent
public ListCellRenderer getTabListCellRenderer()
setTabListCellRenderer(javax.swing.ListCellRenderer)
public void setTabListCellRenderer(ListCellRenderer tabListCellRenderer)
public static class TabListCellRenderer extends DefaultListCellRenderer {
public Component getListCellRendererComponent(JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
if (value instanceof JideTabbedPane) { // will always be true
JideTabbedPane tabbedPane = (JideTabbedPane) value;
String title = tabbedPane.getTitleAt(index);
Icon icon = tabbedPane.getIconAt(index);
JLabel label = (JLabel) super.getListCellRendererComponent(list, title, index,
isSelected, cellHasFocus);
label.setIcon(icon);
return label;
}
else {
return super.getListCellRendererComponent(list, value, index, isSelected,
cellHasFocus);
}
}
}
You can create your own cell renderer either extending JideTabbedPane.TabListCellRenderer
or starting from scratch.
tabListCellRenderer
- the cell rendererpublic boolean hasFocusComponent()
public Insets getContentBorderInsets()
public void setContentBorderInsets(Insets contentBorderInsets)
contentBorderInsets
- the content border insetspublic Insets getTabAreaInsets()
public void setTabAreaInsets(Insets tabAreaInsets)
tabAreaInsets
- the content border insetspublic Insets getTabInsets()
public void setTabInsets(Insets tabInsets)
tabInsets
- the content border insetspublic boolean isDragOverDisabled()
setDragOverDisabled(boolean)
public void setDragOverDisabled(boolean dragOverDisabled)
dragOverDisabled
- the flag indicating if drag over is disabledpublic void scrollSelectedTabToVisible(boolean scrollLeft)
scrollLeft
- true to scroll the first tab visible first then scroll left to make the selected tab visible.
This will get a more consistent result. If false, it will simple scroll the selected tab
visible. Sometimes the tab will appear as the first visible tab or the last visible tab
depending on the previous viewport position.public void addTabEditingListener(TabEditingListener l)
TabEditingListener
to this tabbedpane.
l
- the TabEditingListener
to addfireTabEditing(int, int, java.lang.String, java.lang.String)
,
removeTabEditingListener(TabEditingListener)
,
getTabEditingListeners()
public void removeTabEditingListener(TabEditingListener l)
TabEditingListener
from this tabbedpane.
l
- the TabEditingListener
to removefireTabEditing(int, int, java.lang.String, java.lang.String)
,
addTabEditingListener(com.jidesoft.swing.TabEditingListener)
public TabEditingListener[] getTabEditingListeners()
TabEditingListener
s added to this JTabbedPane
with
addTabEditingListener
.
TabEditingListener
s added or an empty array if no listeners have been addedprotected void fireTabEditing(int id, int index, String oldTitle, String newTitle)
public Icon getIconForTab(int tabIndex)
isShowIconsOnTab()
. Note that getIconAt method will always return the tab even though the icon is not displayed
because the two flags above.
tabIndex
- the tab index.
public boolean isScrollSelectedTabOnWheel()
public void setScrollSelectedTabOnWheel(boolean scrollSelectedTabOnWheel)
scrollSelectedTabOnWheel
- the flagpublic boolean isCloseTabOnMouseMiddleButton()
public void setCloseTabOnMouseMiddleButton(boolean closeTabOnMouseMiddleButton)
closeTabOnMouseMiddleButton
- the flagpublic int getTabAlignment()
setTabAlignment(int)
public void setTabAlignment(int tabAlignment)
JideTabbedPane.LEADING
JideTabbedPane.CENTER
JideTabbedPane.LEADING
.
tabAlignment
- the alignment for the tabs relative to the content
IllegalArgumentException
- if tab alignment value isn't one of the above valid valuespublic String getResourceString(String key)
key
- the resource key
protected JidePopup createTabListPopup()
public boolean isTabListPopupVisible()
public void hideTabListPopup()
public void showTabListPopup(JButton listButton)
listButton
- the list button being clicked.protected Point calculateTabListPopupPosition(JButton listButton)
listButton
- the list button being clicked.
protected JList createTabList(Insets insets)
insets
- the insets of its parent container which helps determine the visible row count of the list.
public JideTabbedPane.NoFocusButton createNoFocusButton(int type)
type
- the button type, it could be BUTTON_LIST
, BUTTON_CLOSE
, BUTTON_EAST
,
BUTTON_WEST
, BUTTON_NORTH
or BUTTON_SOUTH
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |