Class AwtUITabList
public class AwtUITabList extends AwtUIControl implements
IAwtUIItemSelectable
{
// Constructors
public AwtUITabList();
// Methods
public IUIComponent add(String s);
public IUIComponent add(String s, int pos);
public IUIComponent add(IUIComponent comp);
public IUIComponent add(IUIComponent comp, int pos);
public void addActionListener(ActionListener l);
public void addItemListener(ItemListener l);
public IUIComponent getBase();
protected void processActionEvent(ActionEvent e);
protected void processHostEvent(AWTEvent e);
protected void processItemEvent(ItemEvent e);
public synchronized void removeActionListener(ActionListener l);
public synchronized void removeItemListener(ItemListener l);
}
This class implements the functionality of a UITabList object in an AWT-based control. An AwtUITabList control is an AwtUIHost component whose associated root container holds a UITabList object. By hosting this object, an AwtUITabList control integrates AFC with AWT. Although an AwtUITabList control is fully compatible with AWT, a UITabList control is optimized for performance and size.
Note The hot-tracked color and the button text color are the same. As a result, hot-tracking does not appear to be functional.
Panel
|
+--AwtUIHost
|
+--AwtUIControl
|
+--AwtUITabList
public AwtUITabList();
Creates an empty AWT-based tab list control.
Remarks:
Call the add method to add tabs to the list.
public IUIComponent add(String s);
Adds a tab containing the specified text to the end of the control.
Return Value:
Returns the tab component that was added.
Parameter | Description |
s
| The text to be displayed on the tab.
|
Remarks:
By default, the tab is hot-tracked. To add a tab that is not hot-tracked, pass a UIText object instead of a String. For more information about hot-tracking, see the UITabList overview.
public IUIComponent add(String s, int pos);
Adds a tab containing the specified text to the control. The tab is added at the specified position.
Return Value:
Returns the tab component that was added.
Parameter | Description |
s
| The text to be displayed on the tab.
|
pos
| The zero-based index at which to add the tab. To add the tab at the end of the control, pass -1.
|
Remarks:
By default, the tab is hot-tracked. To add a tab that is not hot-tracked, pass a UIText object instead of a String. For more information about hot-tracking, see the UITabList overview.
public IUIComponent add(IUIComponent comp);
Adds a tab containing the specified component to the end of the control.
Return Value:
Returns the tab component that was added.
Parameter | Description |
comp
| The component to be displayed on the tab. If comp is already a UITab object, this tab is added. Otherwise, a new UITab object that displays comp is added.
|
Remarks:
Typically, you'll pass a UIText, UIGraphic, or UIItem object for the component.
Overrides:
add(IUIComponent) in AwtUIControl.
public IUIComponent add(IUIComponent comp, int pos);
Adds a tab containing the specified component to the control. The tab is added at the specified position.
Return Value:
Returns the tab component that was added.
Parameter | Description |
comp
| The component to be displayed on the tab. If comp is already a UITab object, this tab is added. Otherwise, a new UITab object that displays comp is added.
|
pos
| The zero-based index at which to add the tab. To add the tab at the end of the control, pass -1.
|
Remarks:
Typically, you'll pass a UIText, UIGraphic, or UIItem object for the component.
Overrides:
add(IUIComponent,int) in AwtUIControl.
public void addActionListener(ActionListener l);
Adds the specified action listener. The listener receives all action events generated for the control.
Return Value:
No return value.
Parameter | Description |
l
| The action listener to be added.
|
See Also: removeActionListener
public void addItemListener(ItemListener l);
Adds the specified item listener. The listener receives all item events generated for the control.
Return Value:
No return value.
Parameter | Description |
l
| The item listener to be added.
|
See Also: removeItemListener
public IUIComponent getBase();
Retrieves the UI component that the control is based on.
Return Value:
Returns the UITabList object associated with the control.
Remarks:
When the AWT-based control is first created, it is associated with a UITabList object.
protected void processActionEvent(ActionEvent e);
Processes action events.
Return Value:
No return value.
Parameter | Description |
e
| The action event.
|
Remarks:
This method is called by processHostEvent and dispatches the event to a registered action listener. When overriding this method, call the super method processActionEvent to ensure the default event processing continues normally.
See Also: addActionListener
protected void processHostEvent(AWTEvent e);
Processes the specified event.
Return Value:
No return value.
Parameter | Description |
e
| The event.
|
Remarks:
This method is automatically invoked if a listener has has been registered through a call to addXXXListener. Depending on the type of event, processHostEvent calls one of the following methods.
When overriding processHostEvent, call the super method processHostEvent to ensure the default event processing continues normally.
protected void processItemEvent(ItemEvent e);
Processes item events.
Return Value:
No return value.
Parameter | Description |
e
| The item event.
|
Remarks:
This method is called by processHostEvent and dispatches the event to a registered item listener. When overriding this method, call the super method processItemEvent to ensure the default event processing continues normally.
See Also: addItemListener
public synchronized void removeActionListener(ActionListener l);
Removes the specified action listener. The listener no longer receives the control's action events.
Return Value:
No return value.
Parameter | Description |
l
| The action listener to be removed.
|
See Also: addActionListener
public synchronized void removeItemListener(ItemListener l);
Removes the specified item listener. The listener no longer receives the control's item events.
Return Value:
No return value.
Parameter | Description |
l
| The item listener to be removed.
|
See Also: addItemListener