org.kemet.lf.components
Class KemetToolBar

java.lang.Object
  extended by org.kemet.lf.components.ComponentsKemet
      extended by org.kemet.lf.components.KemetToolBar
All Implemented Interfaces:
java.lang.Runnable, IComponents

public class KemetToolBar
extends ComponentsKemet
implements java.lang.Runnable

Since:
0.3
Author:
fabricemaupin

KemetToolBar : Creation and management of a toolbar.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kemet.lf.components.ComponentsKemet
ComponentsKemet.CheckBoxIcon, ComponentsKemet.RadioButtonIcon
 
Field Summary
 
Fields inherited from interface org.kemet.lf.components.IComponents
footerPanelHeight, headerPanelHeight, maxSizeTitle, menuPanelHeight, posCentralPanel, posMenuPanel, sizeFont, valueToRemoveFromWindowWidth
 
Constructor Summary
KemetToolBar(java.lang.String title, ToolBarsTypeEnum type)
           create tool bar.
 
Method Summary
 java.lang.Exception getException()
           return the raised exception.
 javax.swing.JPanel getHeaderPanel()
           return the header panel.
 javax.swing.JFrame getJf()
           return the JFrame of the toolbar.
 javax.swing.JScrollPane getJs()
           return the scrollable list.
 java.awt.LayoutManager getLayout()
           return the layout of toolbar.
static int[] getTheNearestToolbarToMainWindow()
           return the index of the nearest toolbar to main window.
 javax.swing.JPanel getToolBarPanel()
           return the tool bar panel.
 int getWindowHeight()
           return the height of window.
 int getWindowPosX()
           return the coordinate X of window.
 int getWindowPosY()
           return the coordinate Y of window.
 int getWindowWidth()
           return the width of window.
 void run()
           run the thread which be going to initialize the window.
 void setLayout(java.awt.LayoutManager layout)
           set the layout of toolbar.
 void setWindowHeight(int windowHeight)
           set the height of window.
 void setWindowPosX(int windowPosX)
           set the coordinate X of window.
 void setWindowPosY(int windowPosY)
           set the coordinate Y of window.
 void setWindowWidth(int windowWidth)
           set the width of window.
static void showOrHideToolbars(boolean flag)
           show or hide toolbars.
 void update(java.util.List<javax.swing.JPanel> panels)
           update toolbar.
 
Methods inherited from class org.kemet.lf.components.ComponentsKemet
getFooterPanel, getMenuPanel, setFooterPanel, setHeaderPanel, setMenuPanel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KemetToolBar

public KemetToolBar(java.lang.String title,
                    ToolBarsTypeEnum type)
             throws ExceptionManager

create tool bar.

Parameters:
title - title of tool bar
type - type of toolbar
Throws:
ExceptionManager
Since:
0.3
Method Detail

run

public void run()

run the thread which be going to initialize the window.

Specified by:
run in interface java.lang.Runnable

showOrHideToolbars

public static void showOrHideToolbars(boolean flag)
                               throws ExceptionManager

show or hide toolbars.

Parameters:
flag - true (show) / false (hide)
Throws:
ExceptionManager
Since:
0.4

getTheNearestToolbarToMainWindow

public static int[] getTheNearestToolbarToMainWindow()
                                              throws ExceptionManager

return the index of the nearest toolbar to main window.

Returns:
index of toolbar + orientation (X or Y)
Throws:
ExceptionManager
Since:
0.4

getHeaderPanel

public javax.swing.JPanel getHeaderPanel()

return the header panel.

Overrides:
getHeaderPanel in class ComponentsKemet
Returns:
header Panel
Since:
0.3

getToolBarPanel

public javax.swing.JPanel getToolBarPanel()

return the tool bar panel.

Returns:
tool bar Panel
Since:
0.3

getWindowWidth

public int getWindowWidth()

return the width of window.

Returns:
width of window
Since:
0.3

setWindowWidth

public void setWindowWidth(int windowWidth)

set the width of window.

Parameters:
windowWidth - width of window
Since:
0.3

getWindowHeight

public int getWindowHeight()

return the height of window.

Returns:
height of window
Since:
0.3

setWindowHeight

public void setWindowHeight(int windowHeight)

set the height of window.

Parameters:
windowHeight - height of window
Since:
0.3

getWindowPosX

public int getWindowPosX()

return the coordinate X of window.

Returns:
coordinate X of window
Since:
0.3

setWindowPosX

public void setWindowPosX(int windowPosX)

set the coordinate X of window.

Parameters:
windowPosX - coordinate X of window
Since:
0.3

getWindowPosY

public int getWindowPosY()

return the coordinate Y of window.

Returns:
coordinate Y of window
Since:
0.3

setWindowPosY

public void setWindowPosY(int windowPosY)

set the coordinate Y of window.

Parameters:
windowPosY - coordinate Y of window
Since:
0.3

getLayout

public java.awt.LayoutManager getLayout()

return the layout of toolbar.

Returns:
layout
Since:
0.3

setLayout

public void setLayout(java.awt.LayoutManager layout)

set the layout of toolbar.

Parameters:
layout - layout of toolbar
Since:
0.3

getJf

public javax.swing.JFrame getJf()

return the JFrame of the toolbar.

Returns:
JFrame
Since:
0.4

getJs

public javax.swing.JScrollPane getJs()

return the scrollable list.

Returns:
JScrollPane
Since:
0.4

getException

public java.lang.Exception getException()

return the raised exception.

Returns:
raised exception
Since:
0.4

update

public void update(java.util.List<javax.swing.JPanel> panels)
            throws ExceptionManager

update toolbar.

Parameters:
panels - list of panels for toolBarPanel
Throws:
ExceptionManager
Since:
0.4


Copyright © 2008 F. MAUPIN. All Rights Reserved.