JIDE 3.5.15

com.jidesoft.swing
Class SidePaneItem

java.lang.Object
  extended by com.jidesoft.swing.SidePaneItem

public class SidePaneItem
extends Object

SidePaneItem is a data structure used by SidePane. It has a title, an icon, a component and a mouse listener.

See Also:
SidePane

Constructor Summary
SidePaneItem(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
 Color getBackground()
          Gets the background.
 Component getComponent()
          Gets the component.
 Font getFont()
          Gets the font.
 Color getForeground()
          Gets the foreground.
 Icon getIcon()
          Gets the icon.
 MouseInputListener getMouseListener()
          Gets the mouse listener.
 String getTitle()
          Gets the title.
 boolean isSelected()
          True if the item is selected.
 void setBackground(Color background)
          Sets the background.
 void setComponent(Component component)
          Sets the component.
 void setFont(Font font)
          Sets the font.
 void setForeground(Color foreground)
          Sets the foreground.
 void setIcon(Icon icon)
          Sets the icon.
 void setMouseInputListener(MouseInputListener mouseListener)
          Sets the mouse listener.
 void setSelected(boolean selected)
          Selects the item.
 void setTitle(String title)
          Sets the title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SidePaneItem

public SidePaneItem(String title)
Constructs a SidePaneItem with title.

Parameters:
title - title of SidePaneItem

SidePaneItem

public SidePaneItem(String title,
                    Icon icon)
Constructs a SidePaneItem with title and icon.

Parameters:
title - title of SidePaneItem
icon - icon of SidePaneItem

SidePaneItem

public SidePaneItem(String title,
                    Icon icon,
                    Component component)
Constructs a SidePaneItem with title, icon and component.

Parameters:
title - title of SidePaneItem
icon - icon of SidePaneItem
component - component in SidePaneItem

SidePaneItem

public SidePaneItem(String title,
                    Icon icon,
                    Component component,
                    MouseInputListener listener)
Constructs a SidePaneItem with title, icon and component.

Parameters:
title - title of SidePaneItem
icon - icon of SidePaneItem
component - component in SidePaneItem
listener - mouse listener when user hover or click on SidePane
Method Detail

getIcon

public Icon getIcon()
Gets the icon.

Returns:
the icon

setIcon

public void setIcon(Icon icon)
Sets the icon.

Parameters:
icon - the new icon

getTitle

public String getTitle()
Gets the title.

Returns:
the title

setTitle

public void setTitle(String title)
Sets the title.

Parameters:
title - the new title

getComponent

public Component getComponent()
Gets the component.

Returns:
the component

setComponent

public void setComponent(Component component)
Sets the component.

Parameters:
component - the new component

getMouseListener

public MouseInputListener getMouseListener()
Gets the mouse listener.

Returns:
the mouse listener

setMouseInputListener

public void setMouseInputListener(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 Color getForeground()
Gets the foreground.

If you didn't ever invoke setForeground(java.awt.Color) and the component is an instance of TabColorProvider, TabColorProvider.getTabForeground() will be used.

Returns:
the foreground color. null means that default color will be used.

setForeground

public void setForeground(Color foreground)
Sets the foreground.

Parameters:
foreground - the foreground color

getBackground

public Color getBackground()
Gets the background.

If you didn't ever invoke setBackground(java.awt.Color) and the component is an instance of TabColorProvider, TabColorProvider.getTabBackground() will be used.

Returns:
the background color. null means that default color will be used.

setBackground

public void setBackground(Color background)
Sets the background.

Parameters:
background - the background color

getFont

public Font getFont()
Gets the font.

Returns:
the font. null means that default font will be used.

setFont

public void setFont(Font font)
Sets the font.

Parameters:
font - the font

JIDE 3.5.15