|
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.pane.OutlookTabbedPane
public class OutlookTabbedPane
OutlookTabbedPane is a changed version of JTabbedPane. As we all know, JTabbedPane provides a way to organize multiple panes and allows user to see one pane at a time. OutlookTabbedPane serves the same purpose. However it organizes the panes in a vertical way like as you see in Microsoft Outlook 2003.
The interface and usage of OutlookTabbedPane are the same as JTabbedPane. We even keep the name of methods to be the same so that you easily convert from JTabbedPane to OutlookTabbedPane.
Nested Class Summary | |
---|---|
protected class |
OutlookTabbedPane.AccessibleJTabbedPane
This class implements accessibility support for the JTabbedPane class. |
class |
OutlookTabbedPane.MouseHandler
|
class |
OutlookTabbedPane.OptionDialog
|
class |
OutlookTabbedPane.OutlookButton
|
Nested classes/interfaces inherited from class javax.swing.JTabbedPane |
---|
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 ChangeListener |
_selectionChangeListener
|
static String |
CONTEXT_MENU_ADD_REMOVE_BUTTON
|
static String |
CONTEXT_MENU_OPTION
|
static String |
CONTEXT_MENU_SHOW_FEWER_BUTTON
|
static String |
CONTEXT_MENU_SHOW_MORE_BUTTON
|
static String |
PROPERTY_BOTTOM_BUTTON_COUNT
|
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 | |
---|---|
OutlookTabbedPane()
Creates OutlookTabbedPane. |
Method Summary | |
---|---|
protected AbstractButton |
createButton(Action action)
Creates the button used by OutlookTabbedPane. |
protected int[] |
createCounts()
|
protected LayoutManager |
createLayout()
|
protected JPopupMenu |
createPopupMenu()
Creates the popup menu that is used when user clicking on the chevron on the bottom button bar. |
protected Action |
createSwitchPageAction(String title,
Icon icon,
int index)
|
protected String[] |
createTitles(Vector<String> titles)
|
protected void |
customizeBottomButton(AbstractButton button)
Customizes the button used by OutlookTabbedPane's bottom panel. |
protected void |
customizeButton(AbstractButton button)
Customizes the button used by OutlookTabbedPane. |
protected void |
customizeOptionDialog(JDialog dialog)
Customizes the option dialog. |
protected void |
displayOptionDialog()
|
protected void |
fireStateChanged()
|
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JTabbedPane. |
Color |
getBackgroundAt(int index)
|
int |
getBottomButtonCount()
Gets the button count on the bottom panel. |
JPanel |
getBottomPanel()
Gets the panel on the bottom that has the bottom buttons and the chevron. |
int |
getButtonPanelHeight()
Get the height of the button panel. |
Vector<AbstractButton> |
getButtons()
Gets the buttons used by this tabbedPane in a Vector. |
Icon |
getDisabledIconAt(int index)
|
int |
getDisplayedMnemonicIndexAt(int tabIndex)
|
Color |
getForegroundAt(int index)
|
Icon |
getIconAt(int index)
|
protected ImageIcon |
getImageIcon(String iconName)
Gets the image icon used by the popup menu. |
int |
getMnemonicAt(int tabIndex)
|
String |
getOptionDialogTitle()
|
protected String |
getResourceString(String key)
Gets the localized string from resource bundle. |
String[] |
getTabOrder()
Gets the tab order. |
String |
getTitleAt(int index)
|
String |
getToolTipTextAt(int index)
|
String |
getVersion()
Gets an optional version string. |
protected Component |
getVisibleComponent()
|
int[] |
getVisibleTabs()
Gets the visible tabs' index. |
void |
insertTab(String title,
Icon icon,
Component component,
String tip,
int index)
Overrides to insert a button for this new tab. |
boolean |
isChevronVisible()
|
boolean |
isEnabledAt(int index)
|
boolean |
isTabVisibleAt(int index)
Checks if the tab at the specified index is visible. |
void |
removeTabAt(int index)
Overrides to remove the button for the tab index. |
void |
setBackgroundAt(int index,
Color background)
|
void |
setBottomButtonCount(int bottomButtonCount)
Sets the button count on the bottom panel. |
void |
setButtonPanelHeight(int buttonPanelHeight)
Set the height of the button panel. |
void |
setChevronVisible(boolean visible)
|
void |
setDisabledIconAt(int index,
Icon disabledIcon)
|
void |
setDisplayedMnemonicIndexAt(int tabIndex,
int mnemonicIndex)
|
void |
setEnabledAt(int index,
boolean enabled)
|
void |
setForegroundAt(int index,
Color foreground)
|
void |
setIconAt(int index,
Icon icon)
|
void |
setMnemonicAt(int tabIndex,
int mnemonic)
|
void |
setOptionDialogTitle(String optionDialogTitle)
|
void |
setSelectedIndex(int index)
|
void |
setTabOrder(String[] titles)
Sets the tab order. |
void |
setTabVisibleAt(int index,
boolean visible)
Shows or hide the tab at the specified index. |
void |
setTitleAt(int index,
String title)
|
void |
setToolTipTextAt(int index,
String toolTipText)
|
void |
setVersion(String version)
Sets version string. |
protected void |
setVisibleComponent(Component component)
|
void |
setVisibleTabs(int[] tabs)
Sets the visible tabs. |
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 PROPERTY_BOTTOM_BUTTON_COUNT
protected ChangeListener _selectionChangeListener
public static final String CONTEXT_MENU_SHOW_MORE_BUTTON
public static final String CONTEXT_MENU_SHOW_FEWER_BUTTON
public static final String CONTEXT_MENU_OPTION
public static final String CONTEXT_MENU_ADD_REMOVE_BUTTON
Constructor Detail |
---|
public OutlookTabbedPane()
Method Detail |
---|
public void updateUI()
updateUI
in class JTabbedPane
JComponent.updateUI()
protected LayoutManager createLayout()
protected Action createSwitchPageAction(String title, Icon icon, int index)
public Vector<AbstractButton> getButtons()
public void setSelectedIndex(int index)
setSelectedIndex
in class JTabbedPane
public void removeTabAt(int index)
removeTabAt
in class JTabbedPane
index
- the tab indexpublic void insertTab(String title, Icon icon, Component component, String tip, int index)
insertTab
in class JTabbedPane
title
- the title to be displayed in this tabicon
- the icon to be displayed in this tabcomponent
- The component to be displayed when this tab is clicked.tip
- the tooltip to be displayed for this tabindex
- the position to insert this new tabprotected AbstractButton createButton(Action action)
OutlookButton outlookButton = new OutlookButton(action);
outlookButton.setName((String) action.getValue(Action.NAME));
customizeButton(outlookButton);
return outlookButton;
where OutlookButton
is defined as
public class OutlookButton extends JideButton implements UIResource {
public OutlookButton(Action a) {
super(a);
}
}
action
- the AbstractAction
public int getButtonPanelHeight()
public void setButtonPanelHeight(int buttonPanelHeight)
buttonPanelHeight
- the heightpublic int getMnemonicAt(int tabIndex)
getMnemonicAt
in class JTabbedPane
public void setMnemonicAt(int tabIndex, int mnemonic)
setMnemonicAt
in class JTabbedPane
public int getDisplayedMnemonicIndexAt(int tabIndex)
getDisplayedMnemonicIndexAt
in class JTabbedPane
public void setDisplayedMnemonicIndexAt(int tabIndex, int mnemonicIndex)
setDisplayedMnemonicIndexAt
in class JTabbedPane
public void setTitleAt(int index, String title)
setTitleAt
in class JTabbedPane
public String getTitleAt(int index)
getTitleAt
in class JTabbedPane
public Icon getIconAt(int index)
getIconAt
in class JTabbedPane
public void setIconAt(int index, Icon icon)
setIconAt
in class JTabbedPane
public Icon getDisabledIconAt(int index)
getDisabledIconAt
in class JTabbedPane
public void setDisabledIconAt(int index, Icon disabledIcon)
setDisabledIconAt
in class JTabbedPane
public String getToolTipTextAt(int index)
getToolTipTextAt
in class JTabbedPane
public void setToolTipTextAt(int index, String toolTipText)
setToolTipTextAt
in class JTabbedPane
public boolean isEnabledAt(int index)
isEnabledAt
in class JTabbedPane
public void setEnabledAt(int index, boolean enabled)
setEnabledAt
in class JTabbedPane
public void setForegroundAt(int index, Color foreground)
setForegroundAt
in class JTabbedPane
public Color getForegroundAt(int index)
getForegroundAt
in class JTabbedPane
public void setBackgroundAt(int index, Color background)
setBackgroundAt
in class JTabbedPane
public Color getBackgroundAt(int index)
getBackgroundAt
in class JTabbedPane
public JPanel getBottomPanel()
protected String getResourceString(String key)
key
- the key to the resource.
protected JPopupMenu createPopupMenu()
CONTEXT_MENU_SHOW_MORE_BUTTON
, CONTEXT_MENU_SHOW_FEWER_BUTTON
, CONTEXT_MENU_OPTION
,
CONTEXT_MENU_ADD_REMOVE_BUTTON
. So you can iterate through the menu items and look up by name to find
out which one to add/remove/modify.
protected void displayOptionDialog()
protected void customizeOptionDialog(JDialog dialog)
dialog
- the option dialogprotected int[] createCounts()
protected void customizeButton(AbstractButton button)
button
- the button used by OutlookTabbedPaneprotected void customizeBottomButton(AbstractButton button)
button
- the button used by OutlookTabbedPanepublic String getOptionDialogTitle()
public void setOptionDialogTitle(String optionDialogTitle)
public int[] getVisibleTabs()
public void setVisibleTabs(int[] tabs)
tabs
- the tab indices that will be visible.public boolean isTabVisibleAt(int index)
index
- the tab index.
public void setTabVisibleAt(int index, boolean visible)
index
- the tab index.visible
- true to set the tab visible and false to set the tab invisible.protected void fireStateChanged()
fireStateChanged
in class JTabbedPane
protected String[] createTitles(Vector<String> titles)
public String[] getTabOrder()
public void setTabOrder(String[] titles)
titles
- an string array of all tab titles in the order that they will be displayed.
IllegalArgumentException
- if the title in the titles array doesn't exist in the tabbed pane.public int getBottomButtonCount()
public void setBottomButtonCount(int bottomButtonCount)
PROPERTY_BOTTOM_BUTTON_COUNT
property change event will be fired when the value changes.
bottomButtonCount
- the button count on the bottom panel.public String getVersion()
public void setVersion(String version)
version
- the version of the saved layout.public void setChevronVisible(boolean visible)
public boolean isChevronVisible()
protected Component getVisibleComponent()
protected void setVisibleComponent(Component component)
protected ImageIcon getImageIcon(String iconName)
iconName
- the location of the icon relative to OutlookTabbedPane class location. You can also think it as
the name of the icon when you override this method and use another way to create the image icons
to be used.
public AccessibleContext getAccessibleContext()
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JTabbedPane
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |