borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.view
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.Panel +----borland.jbcl.view.BeanPanel +----borland.jbcl.view.TabsetView +----borland.jbcl.control.TabsetPanel +----borland.jbcl.control.TabsetControl
Variables Constructors Properties Methods Event Listeners
Implements ItemPaintSite, VectorModelListener, VectorSelectionListener, VectorView, MenuContainer, ImageObserver, Serializable, EventListener
The TabsetView component is a view element for developing new composite components that simulate a set of mutually exclusive tabs, like tabs in a notebook, such as those commonly used in tabbed dialogs. It requires a VectorModel data model and a VectorViewManager view manager.
protected ItemPainter defaultPainter
protected transient VectorModel model
protected transient WritableVectorSelection selection
protected transient VectorViewManager viewManager
protected transient WritableVectorModel writeModel
public TabsetView()Creates a TabsetView object with no tabs and TOP alignment.
public int getAlignment() public void setAlignment(int align)
public boolean isClientBordered() public void setClientBordered(boolean bordered)When true, a raised border is drawn around the (non-tab) client area. This property defaults to false.
public boolean isDoubleBuffer() public void setDoubleBuffer(boolean doubleBuffer)
public boolean isFocusAware() public void setFocusAware(boolean focusAware)
public Insets getItemMargins() public void setItemMargins(java.awt.Insets margins)
public String[] getLabels() public void setLabels(java.lang.String[] labels)Stores the array of String labels that are displayed in the tabs. Duplicate label strings are not allowed.
public VectorModel getModel() public void setModel(borland.jbcl.model.VectorModel vm)Specifies the data model object that provides items for the component. The TabsetView component requires a vector model. This property is required and must be set.
public Dimension getPreferredSize()
public boolean isReadOnly() public void setReadOnly(boolean ro)Determines whether the user may change the data displayed in the component at runtime. The readOnly property also returns true if the model is not writable.
public int getSelectedIndex() public void setSelectedIndex(int index)A single-selection property that reflects the tab number of the currently selected tab. The first tab is tab number zero. If no tab is selected, getSelectedIndex returns -1.
public String getSelectedTab() public void setSelectedTab(java.lang.Object item)Reflects the label of the currently selected tab. If no tab is selected, setSelectedTab() returns null.
public WritableVectorSelection getSelection() public void setSelection(borland.jbcl.model.WritableVectorSelection vs)The selection object that holds a list of the items that are currently selected.
public int getSubfocus() public void setSubfocus(int subfocus)Subfocus for tabs always corresponds directly with the single selection.
public boolean isTabsOnTop() public void setTabsOnTop(boolean tabsOnTop)
public boolean isThickBorder() public void setThickBorder(boolean thickBorder)When true, a raised border is drawn around the (non-tab) client area.
public VectorViewManager getViewManager() public void setViewManager(borland.jbcl.model.VectorViewManager viewManager)Determines the view manager object that handles viewer and editor selection for this component. This property is required and must be set.
public WritableVectorModel getWriteModel()Read-only property that specifies the model object used for writing data. Set this property to null if readOnly is true or the model is not writable.
public void addTab(int aheadOf, java.lang.Object item)
public void addTab(java.lang.Object item)
protected void adjustScrollbar()
public void doLayout()
Overrides: java.awt.Container.doLayout()
public String getLabel(int index)Returns the label of the tab at the specified index. The first tab is tab number zero. Returns null if the specified index is out of range.
public int hitTest(int x, int y)
public Insets insets()Returns the insets of the view, taking into account the alignment of the tabs.
Overrides: java.awt.Container.insets()
public void paint(java.awt.Graphics pg)Paints the portion of the component that has changed since the last painting was done.
Overrides: java.awt.Container.paint(Graphics)
protected boolean preProcessSubfocusEvent(borland.jbcl.model.VectorSubfocusEvent e)
protected void processFocusEvent(java.awt.event.FocusEvent e)The view always repaints when it gets focus.
Overrides: borland.jbcl.view.ViewPanel.processFocusEvent(FocusEvent)
protected void processKeyPressed(java.awt.event.KeyEvent e)Handles the following keys when they are pressed:
Home | Selects the first tab |
Left | Selects the tab to the left |
Right | Selects the tab to the right of the currently selected tab |
End | Seleects the last tab |
Overrides: borland.jbcl.view.ViewPanel.processKeyPressed(KeyEvent)
protected void processMousePressed(java.awt.event.MouseEvent e)Selects a tab if the mouse clicks it.
Overrides: borland.jbcl.view.ViewPanel.processMousePressed(MouseEvent)
protected void processSubfocusEvent(borland.jbcl.model.VectorSubfocusEvent e)
public void removeTab(java.lang.Object item)
public void renameTab(java.lang.String oldName, java.lang.String newName)
Changes the label of the tab with the oldName to the newName.
public void repaintTab(int index)
protected boolean scrollCheck(int x, int y)
protected void scrollLeft()
protected void scrollRight()
protected void selectTab(int index)
protected void setBorderHeight(int height)
public void setLabel(int index, java.lang.Object item)
protected void updateTabInfo()
public synchronized void addActionListener(java.awt.event.ActionListener l) public synchronized void removeActionListener(java.awt.event.ActionListener l)
public synchronized void addComponentListener(java.awt.event.ComponentListener l) public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
public synchronized void addContainerListener(java.awt.event.ContainerListener l) public void removeContainerListener(java.awt.event.ContainerListener l)
public synchronized void addFocusListener(java.awt.event.FocusListener l) public synchronized void removeFocusListener(java.awt.event.FocusListener l)
public synchronized void addKeyListener(java.awt.event.KeyListener l) public synchronized void removeKeyListener(java.awt.event.KeyListener l)
public void addModelListener(borland.jbcl.model.VectorModelListener l) public void removeModelListener(borland.jbcl.model.VectorModelListener l)
public synchronized void addMouseListener(java.awt.event.MouseListener l) public synchronized void removeMouseListener(java.awt.event.MouseListener l)
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener l) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
public void addSelectionListener(borland.jbcl.model.VectorSelectionListener l) public void removeSelectionListener(borland.jbcl.model.VectorSelectionListener l)
public void addSubfocusListener(borland.jbcl.model.VectorSubfocusListener l) public void removeSubfocusListener(borland.jbcl.model.VectorSubfocusListener l)