|
|
||||||||||||||||||||||
Class UITabpublic class UITab extends UISingleContainer { // Constructors public UITab(); public UITab(String s); public UITab(IUIComponent comp); // Methods public Insets getInsets(); public int getRoleCode(); public boolean gotFocus(Event e, Object o); public void paint(FxGraphics g); public void setSelected(boolean on); } This class implements a tab control. UITab is used by UITabList to manage a collection of tabs. Typically, you'll use UITabViewer instead of UITab or UITabList. UITabViewer manages a collection of tabs and their associated pages. Note When a UITab object is created with a String, the tab is automatically hot-tracked. To override this default, construct the tab with a UIText object, as shown in the following example. UITab t1, t2, t3; // Construct a tab with a String. By default, the tab // is hot-tracked and the text is left-aligned. t1 = new UITab("Hot-tracked text"); // Construct a tab that is not hot-tracked, using a // UIText object. By default, the text is centered. t2 = new UITab(new UIText("Text not hot-tracked")); // To create a hot-tracked tab using UIText, specify // the UIStatic.HOTTRACK style. To left-align the text, // include the UIStatic.LEFT style. t3 = new UITab(new UIText("Hot-tracked UIText", UIStatic.HOTTRACK | UIStatic.LEFT)); add(t1); add(t2); add(t3); For more information about hot-tracking, see the UIText overview. Note The hot-track color is the same color as the button text color. As a result, hot-tracking does not appear to be functional. UIComponent | +--UIContainer | +--UIStateContainer | +--UISingleContainer | +--UITab ConstructorsUITabpublic UITab(); UITabpublic UITab(String s); UITabpublic UITab(IUIComponent comp); MethodsgetInsetspublic Insets getInsets(); getRoleCodepublic int getRoleCode(); gotFocuspublic boolean gotFocus(Event e, Object o); paintpublic void paint(FxGraphics g); setSelectedpublic void setSelected(boolean on);
|
© 1998 Microsoft Corporation. All rights reserved. Terms of use. |