| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--org.zaval.util.ValidationObject
        |
        +--org.zaval.lw.LwCanvas
              |
              +--org.zaval.lw.LwPanel
                    |
                    +--org.zaval.lw.LwNotebook
This is notebook container. The main features of the container are shown in the list below:
setTitleAlignment to define the alignment.
     The default tabs alignment is "top".
   addPage method. The library provides standard
     tab view - LwTabRender.
   add, insert, remove methods can be used to change
     the notebook pages components.
   enablePage, isPageEnabled methods can be used to change
     enabled state of the specified page.
   addSelectionListener
     and removeSelectionListener methods. The selection event is represented by
     the LwActionEvent. Use getData method of the event to get a page index that
     has been selected.
   The sample below illustrates the notebook container usage:
    ...
    LwNotebook n = new LwNotebook();
    n.addPage("Tab 1", new LwPanel());
    n.addPage("Tab 2", new LwPanel());
    n.addPage("Tab 3", new LwPanel());
    ...
 
| Fields inherited from class org.zaval.lw.LwPanel | 
| children | 
| Fields inherited from class org.zaval.lw.LwCanvas | 
| bits, height, insets, parent, psHeight, psWidth, skins, width, x, y | 
| Fields inherited from class org.zaval.util.ValidationObject | 
| isValidFlag | 
| Constructor Summary | |
| LwNotebook()Constructs a notebook container using default (Alignment.TOP) tabs alignment. | |
| LwNotebook(int orient)Constructs a notebook container using the specified tabs alignment. | |
| Method Summary | |
|  void | addPage(LwView v,
        LwComponent c)Adds the specified component as the notebook page and sets the specified view as. | 
|  void | addPage(java.lang.String title,
        LwComponent c)Adds the page with the specified title. | 
|  void | addSelectionListener(LwActionListener l)Adds the specified selection listener to receive selection events from this notebook container. | 
|  java.awt.Dimension | calcPreferredSize(LayoutContainer target)Calculates the preferred size dimension for the layout container. | 
|  boolean | canHaveFocus()Specifies if the component can have focus. | 
|  void | componentAdded(java.lang.Object id,
               Layoutable lw,
               int index)Invoked when the specified layoutable component is added to the layout container (that uses the layout manager). | 
|  void | componentRemoved(Layoutable lw,
                 int index)Invoked when the specified layoutable component is removed from the layout container, that uses the layout manager. | 
|  void | enablePage(int index,
           boolean b)Sets the given enabled state for the specified page. | 
|  void | focusGained(LwFocusEvent e)Invoked when the light weight component gained focus. | 
|  void | focusLost(LwFocusEvent e)Invoked when the light weight component lost focus. | 
| protected  LwLayout | getDefaultLayout()Gets the default layout manager that is set with the container during initialization. | 
|  LwView | getPageView(int i)Returns the tab view for the specified page. | 
|  int | getSelectedIndex()Gets the tab index for the tab that is selected at the moment. | 
|  int | getTitleAlignment()Gets the tabs alignment. | 
|  java.awt.Rectangle | getTitleBounds()Gets the title size and location. | 
|  boolean | isPageEnabled(int index)Tests if the specified page is enabled or not. | 
|  boolean | isSelected(int i)Tests if the tab with the specified index is selected or not. | 
|  void | keyPressed(LwKeyEvent e)Invoked when a key has been pressed. | 
|  void | keyReleased(LwKeyEvent e)Invoked when a key has been released. | 
|  void | keyTyped(LwKeyEvent e)Invoked when a key has been typed. | 
|  void | layout(LayoutContainer target)Lays out the child layoutable components inside the layout container. | 
|  void | mouseClicked(LwMouseEvent e)Invoked when the mouse button has been clicked on a light weight component. | 
|  void | mouseEntered(LwMouseEvent e)Invoked when the mouse enters a light weight component. | 
|  void | mouseExited(LwMouseEvent e)Invoked when the mouse exits a light weight component. | 
|  void | mousePressed(LwMouseEvent e)Invoked when the mouse button has been pressed on a light weight component. | 
|  void | mouseReleased(LwMouseEvent e)Invoked when the mouse button has been released on a light weight component. | 
|  void | paint(java.awt.Graphics g)Paints this component. | 
| protected  void | perform(int index)Fires appropriate selection event for list of selection listeners. | 
| protected  void | recalc()The method is overrided by the component for internal usage. | 
|  void | remove(int i)Removes the component at the specified index from this container. | 
|  void | removeAll()Removes all child components from this container. | 
|  void | removeSelectionListener(LwActionListener l)Removes the specified selection listener so it no longer receives selection events from this notebook conatiner. | 
|  void | select(int index)Selects the tab by the specified index. | 
|  void | setTitleAlignment(int o)Sets the specified tabs alignment. | 
| Methods inherited from class org.zaval.lw.LwPanel | 
| add, add, calcPreferredSize, count, get, getLayoutOffset, getLwComponentAt, getLwLayout, indexOf, insert, insert, invalidate, paintOnTop, remove, setBackground, setLwLayout, setOpaque, toFront, updateCashedPs | 
| Methods inherited from class org.zaval.lw.LwCanvas | 
| getBackground, getBounds, getHeight, getInsets, getLocation, getLwParent, getOrigin, getPreferredSize, getSize, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, isEnabled, isOpaque, isVisible, repaint, repaint, requestFocus, setEnabled, setInsets, setLocation, setLwParent, setPSSize, setSize, setViewMan, setVisible, toString, update, validate, viewManChanged, vrp | 
| Methods inherited from class org.zaval.util.ValidationObject | 
| isValid | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.zaval.lw.LwComponent | 
| getLwParent, getViewMan, getVisiblePart, setEnabled, setLwParent, setViewMan, setVisible | 
| Methods inherited from interface org.zaval.lw.Drawable | 
| getBackground, getOrigin, isEnabled, isOpaque, repaint, repaint, update | 
| Methods inherited from interface org.zaval.util.Validationable | 
| isValid, validate | 
| Methods inherited from interface org.zaval.lw.Layoutable | 
| getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize | 
| Constructor Detail | 
public LwNotebook()
public LwNotebook(int orient)
orient| Method Detail | 
public boolean canHaveFocus()
LwComponentcanHaveFocus in class LwCanvasorg.zaval.lw.LwComponenttrue if the component can have the focus.public int getTitleAlignment()
getTitleAlignment in interface LwTitleInfopublic void setTitleAlignment(int o)
opublic boolean isPageEnabled(int index)
indextrue if the page is enaled;otherwise false.
public void enablePage(int index,
                       boolean b)
indexb
public void addPage(java.lang.String title,
                    LwComponent c)
titlec
public void addPage(LwView v,
                    LwComponent c)
vcpublic LwView getPageView(int i)
ipublic void remove(int i)
LwPanelcomponentRemoved method of the manager.remove in class LwPanelorg.zaval.lw.LwPanelipublic void removeAll()
LwPanelcomponentRemoved method of the manager for every child that has been
 removed.removeAll in class LwPanelprotected void recalc()
recalc in class LwPanelpublic int getSelectedIndex()
public void paint(java.awt.Graphics g)
paint in class LwCanvasgpublic void keyPressed(LwKeyEvent e)
LwKeyListenerkeyPressed in interface LwKeyListenerorg.zaval.lw.event.LwKeyListenerepublic void mousePressed(LwMouseEvent e)
LwMouseListenermousePressed in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenerepublic void keyReleased(LwKeyEvent e)
LwKeyListenerkeyReleased in interface LwKeyListenerorg.zaval.lw.event.LwKeyListenerepublic void keyTyped(LwKeyEvent e)
LwKeyListenerkeyTyped in interface LwKeyListenerorg.zaval.lw.event.LwKeyListenerepublic void mouseEntered(LwMouseEvent e)
LwMouseListenermouseEntered in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenerepublic void mouseExited(LwMouseEvent e)
LwMouseListenermouseExited in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenerepublic void mouseClicked(LwMouseEvent e)
LwMouseListenermouseClicked in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenerepublic void mouseReleased(LwMouseEvent e)
LwMouseListenermouseReleased in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenere
public void componentAdded(java.lang.Object id,
                           Layoutable lw,
                           int index)
LwLayoutcomponentAdded in interface LwLayoutorg.zaval.lw.LwLayoutidlwindex
public void componentRemoved(Layoutable lw,
                             int index)
LwLayoutcomponentRemoved in interface LwLayoutorg.zaval.lw.LwLayoutlwindexpublic java.awt.Dimension calcPreferredSize(LayoutContainer target)
LwLayoutcalcPreferredSize in interface LwLayoutorg.zaval.lw.LwLayouttargetpublic void layout(LayoutContainer target)
LwLayoutlayout in interface LwLayoutorg.zaval.lw.LwLayouttargetpublic void select(int index)
-1 index value to de-select
 current selected tab, in this case no one tab will be selected.indexpublic boolean isSelected(int i)
true if the tab with the specified index is selected; otherwise
 false.public void addSelectionListener(LwActionListener l)
lpublic void removeSelectionListener(LwActionListener l)
lpublic java.awt.Rectangle getTitleBounds()
LwTitleInfoy coordinate to locate the border and x
     coordinate is calculated depending on the title border alignment.
   x coordinate to locate the border and y
     coordinate is calculated depending on the title border alignment.
   getTitleBounds in interface LwTitleInfoorg.zaval.lw.LwTitleInfopublic void focusGained(LwFocusEvent e)
LwFocusListenerfocusGained in interface LwFocusListenerorg.zaval.lw.event.LwFocusListenerepublic void focusLost(LwFocusEvent e)
LwFocusListenerfocusLost in interface LwFocusListenerorg.zaval.lw.event.LwFocusListenereprotected void perform(int index)
getData method
 returns the tab index that has been selectedindexprotected LwLayout getDefaultLayout()
getDefaultLayout in class LwPanel| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||