Package com.jidesoft.swing
Class SidePaneItem
- java.lang.Object
-
- com.jidesoft.swing.SidePaneItem
-
-
Constructor Summary
Constructors Constructor Description SidePaneItem(java.lang.String title)Constructs a SidePaneItem with title.SidePaneItem(java.lang.String title, javax.swing.Icon icon)Constructs a SidePaneItem with title and icon.SidePaneItem(java.lang.String title, javax.swing.Icon icon, java.awt.Component component)Constructs a SidePaneItem with title, icon and component.SidePaneItem(java.lang.String title, javax.swing.Icon icon, java.awt.Component component, javax.swing.event.MouseInputListener listener)Constructs a SidePaneItem with title, icon and component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetBackground()Gets the background.java.awt.ComponentgetComponent()Gets the component.java.awt.FontgetFont()Gets the font.java.awt.ColorgetForeground()Gets the foreground.javax.swing.IcongetIcon()Gets the icon.javax.swing.event.MouseInputListenergetMouseListener()Gets the mouse listener.java.lang.StringgetTitle()Gets the title.booleanisSelected()True if the item is selected.voidsetBackground(java.awt.Color background)Sets the background.voidsetComponent(java.awt.Component component)Sets the component.voidsetFont(java.awt.Font font)Sets the font.voidsetForeground(java.awt.Color foreground)Sets the foreground.voidsetIcon(javax.swing.Icon icon)Sets the icon.voidsetMouseInputListener(javax.swing.event.MouseInputListener mouseListener)Sets the mouse listener.voidsetSelected(boolean selected)Selects the item.voidsetTitle(java.lang.String title)Sets the title.
-
-
-
Constructor Detail
-
SidePaneItem
public SidePaneItem(java.lang.String title)
Constructs a SidePaneItem with title.- Parameters:
title- title of SidePaneItem
-
SidePaneItem
public SidePaneItem(java.lang.String title, javax.swing.Icon icon)Constructs a SidePaneItem with title and icon.- Parameters:
title- title of SidePaneItemicon- icon of SidePaneItem
-
SidePaneItem
public SidePaneItem(java.lang.String title, javax.swing.Icon icon, java.awt.Component component)Constructs a SidePaneItem with title, icon and component.- Parameters:
title- title of SidePaneItemicon- icon of SidePaneItemcomponent- component in SidePaneItem
-
SidePaneItem
public SidePaneItem(java.lang.String title, javax.swing.Icon icon, java.awt.Component component, javax.swing.event.MouseInputListener listener)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 Detail
-
getIcon
public javax.swing.Icon getIcon()
Gets the icon.- Returns:
- the icon
-
setIcon
public void setIcon(javax.swing.Icon icon)
Sets the icon.- Parameters:
icon- the new icon
-
getTitle
public java.lang.String getTitle()
Gets the title.- Returns:
- the title
-
setTitle
public void setTitle(java.lang.String title)
Sets the title.- Parameters:
title- the new title
-
getComponent
public java.awt.Component getComponent()
Gets the component.- Returns:
- the component
-
setComponent
public void setComponent(java.awt.Component component)
Sets the component.- Parameters:
component- the new component
-
getMouseListener
public javax.swing.event.MouseInputListener getMouseListener()
Gets the mouse listener.- Returns:
- the mouse listener
-
setMouseInputListener
public void setMouseInputListener(javax.swing.event.MouseInputListener mouseListener)
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
public java.awt.Color 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
public void setForeground(java.awt.Color foreground)
Sets the foreground.- Parameters:
foreground- the foreground color
-
getBackground
public java.awt.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
public void setBackground(java.awt.Color background)
Sets the background.- Parameters:
background- the background color
-
getFont
public java.awt.Font getFont()
Gets the font.- Returns:
- the font. null means that default font will be used.
-
setFont
public void setFont(java.awt.Font font)
Sets the font.- Parameters:
font- the font
-
-