Package com.jidesoft.swing
Class SidePaneItem
java.lang.Object
com.jidesoft.swing.SidePaneItem
SidePaneItem is a data structure used by
SidePane
. It has a title, an icon, a component
and a mouse listener.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSidePaneItem
(String title) Constructs a SidePaneItem with title.SidePaneItem
(String title, Icon icon) Constructs a SidePaneItem with title and icon.SidePaneItem
(String title, Icon icon, Component component) Constructs a SidePaneItem with title, icon and component.SidePaneItem
(String title, Icon icon, Component component, MouseInputListener listener) Constructs a SidePaneItem with title, icon and component. -
Method Summary
Modifier and TypeMethodDescriptionGets the background.Gets the component.getFont()
Gets the font.Gets the foreground.getIcon()
Gets the icon.Gets the mouse listener.getTitle()
Gets the title.boolean
True if the item is selected.void
setBackground
(Color background) Sets the background.void
setComponent
(Component component) Sets the component.void
Sets the font.void
setForeground
(Color foreground) Sets the foreground.void
Sets the icon.void
setMouseInputListener
(MouseInputListener mouseListener) Sets the mouse listener.void
setSelected
(boolean selected) Selects the item.void
Sets the title.
-
Constructor Details
-
SidePaneItem
Constructs a SidePaneItem with title.- Parameters:
title
- title of SidePaneItem
-
SidePaneItem
Constructs a SidePaneItem with title and icon.- Parameters:
title
- title of SidePaneItemicon
- icon of SidePaneItem
-
SidePaneItem
Constructs a SidePaneItem with title, icon and component.- Parameters:
title
- title of SidePaneItemicon
- icon of SidePaneItemcomponent
- component in SidePaneItem
-
SidePaneItem
Constructs a SidePaneItem with title, icon and component.- Parameters:
title
- title of SidePaneItemicon
- icon of SidePaneItemcomponent
- component in SidePaneItemlistener
- mouse listener when user hover or click on SidePane
-
-
Method Details
-
getIcon
Gets the icon.- Returns:
- the icon
-
setIcon
Sets the icon.- Parameters:
icon
- the new icon
-
getTitle
Gets the title.- Returns:
- the title
-
setTitle
Sets the title.- Parameters:
title
- the new title
-
getComponent
Gets the component.- Returns:
- the component
-
setComponent
Sets the component.- Parameters:
component
- the new component
-
getMouseListener
Gets the mouse listener.- Returns:
- the mouse listener
-
setMouseInputListener
Sets the mouse listener.- Parameters:
mouseListener
- the new mouse listener
-
isSelected
public boolean isSelected()True if the item is selected.- Returns:
- true if the item is selected.
-
setSelected
public void setSelected(boolean selected) Selects the item.- Parameters:
selected
- the flag
-
getForeground
Gets the foreground. If you didn't ever invokesetForeground(java.awt.Color)
and the component is an instance ofTabColorProvider
,TabColorProvider.getTabForeground()
will be used.- Returns:
- the foreground color. null means that default color will be used.
-
setForeground
Sets the foreground.- Parameters:
foreground
- the foreground color
-
getBackground
Gets the background. If you didn't ever invokesetBackground(java.awt.Color)
and the component is an instance ofTabColorProvider
,TabColorProvider.getTabBackground()
will be used.- Returns:
- the background color. null means that default color will be used.
-
setBackground
Sets the background.- Parameters:
background
- the background color
-
getFont
Gets the font.- Returns:
- the font. null means that default font will be used.
-
setFont
Sets the font.- Parameters:
font
- the font
-