Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.smardec.asc.outlookpanel
Class JOutlookTab

    java.lang.Object
      |
      +--com.smardec.asc.outlookpanel.JOutlookTab

public class JOutlookTab
extends java.lang.Object

A tab that used by `JOutlookPanel` to show user defined outlook buttons.

Constructor Summary
`JOutlookTab(java.lang.String text, javax.swing.Icon icon)` Creates tab with with initial header text and icon.

Method Summary
`void` | `addButton(int index, JOutlookButton jOutlookButton)` Inserts the specified button at the specified position in this `JOutlookTab`.
`void` | `addButton(JOutlookButton jOutlookButton)` Appends the specified button to the end of this `JOutlookTab`.
`int` | `getButtonCount()` Returns the number of buttons in this `JOutlookTab`.
`int` | `getButtonIndex(JOutlookButton jOutlookButton)` Returns the index of the specified button, or -1 if this `JOutlookTab` does not contain this button.
`javax.swing.Icon` | `getIcon()` Returns tab header's icon.
`JOutlookPanel` | `getOutlookPanel()` Returns the parent `JOutlookPanel` of this tab.
`JOutlookButton` | `getTab(int index)` Returns the button at the specified position in this `JOutlookTab`.
`java.lang.String` | `getText()` Returns tab header's text.
`boolean` | `isSelected()` Returns the state of the `JOutlookTab`.
`void` | `removeButton(int index)` Removes the button at the specified position in this `JOutlookTab`.
`void` | `setIcon(javax.swing.Icon icon)` Specifies tab header's icon.
`void` | `setSelected(boolean selected)` Specifies the state of the `JOutlookTab`.
`void` | `setText(java.lang.String text)` Specifies tab header's text.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JOutlookTab

    public JOutlookTab(java.lang.String text,
                       javax.swing.Icon icon)

  Creates tab with with initial header text and icon.

Parameters:
  `text` - the text of the tab header
  `icon` - the Icon image to display on the tab header

Method Detail

### getButtonCount

    public int getButtonCount()

  Returns the number of buttons in this `JOutlookTab`.

  Returns:
    the number of buttons in this `JOutlookTab`.

### getTab

    public JOutlookButton getTab(int index)

  Returns the button at the specified position in this `JOutlookTab`.

  Parameters:
    `index` - index of button to return.
  Returns:
    the button at the specified position in this `JOutlookTab`
  Throws:
    `java.lang.IllegalArgumentException` - index is out of range (index < 0 || index >= `getButtonCount()`).

### getButtonIndex

    public int getButtonIndex(JOutlookButton jOutlookButton)

  Returns the index of the specified button, or -1 if this `JOutlookTab` does not contain this button.

  Parameters:
    `jOutlookButton` - an `JOutlookButton`.
  Returns:
    the index of the specified button in this `JOutlookTab`.

### addButton

    public void addButton(int index,
                          JOutlookButton jOutlookButton)

  Inserts the specified button at the specified position in this `JOutlookTab`. Shifts the button currently at that position (if any) and any subsequent buttons to the bottom (adds one to their indices).

  Parameters:
    `index` - index at which the specified button is to be inserted
    `jOutlookButton` - a button to be inserted
  See Also:
    `removeButton(int)`

### addButton

    public void addButton(JOutlookButton jOutlookButton)

  Appends the specified button to the end of this `JOutlookTab`.

  Parameters:
    `jOutlookButton` - button to be appended to this `JOutlookTab`
  See Also:
    `removeButton(int)`

### removeButton

    public void removeButton(int index)

  Removes the button at the specified position in this `JOutlookTab`. Shifts any subsequent buttons to the top (subtracts one from their indices).

  Parameters:
    `index` - the button that was removed
  See Also:
    `addButton(int, JOutlookButton)`, `addButton(JOutlookButton)`

### getText

    public java.lang.String getText()

  Returns tab header's text.

  Returns:
    tab header's text.
  See Also:
    `setText(String)`

### setText

    public void setText(java.lang.String text)

  Specifies tab header's text.

  Parameters:
    `text` - tab header's text.
  See Also:
    `getText()`

### getIcon

    public javax.swing.Icon getIcon()

  Returns tab header's icon.

  Returns:
    tab header's icon.
  See Also:
    `setIcon(javax.swing.Icon)`

### setIcon

    public void setIcon(javax.swing.Icon icon)

  Specifies tab header's icon.

  Parameters:
    `icon` - tab header's icon.
  See Also:
    `getIcon()`

### isSelected

    public boolean isSelected()

  Returns the state of the `JOutlookTab`. True if the `JOutlookTab` is selected, false if it's not

  Returns:
    `true` if this `JOutlookTab` is selected, `false` otherwise

### setSelected

    public void setSelected(boolean selected)

  Specifies the state of the `JOutlookTab`. Note that this method does not trigger an event. Invoke `JOutlookPanel.setSelectedTabIndex(int)` or `JOutlookPanel.setSelectedTabIndex(int, int)` to perform a programmatic state change.

  Parameters:
    `selected` - `true` if this `JOutlookTab` is selected, `false` otherwise

### getOutlookPanel

    public JOutlookPanel getOutlookPanel()

  Returns the parent `JOutlookPanel` of this tab.

  Returns:
    the parent `JOutlookPanel` of this tab.

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006 Smardec. All Rights Reserved.