Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junk.gui.box
Class JXBox  view JXBox download JXBox.java

java.lang.Object
  extended byjunk.gui.box.JXBox

public class JXBox
extends java.lang.Object

JXBox is a GUI Box used to host programs and components. Unlike a frame it cannot be closed but can be minimized. It should be used only for components that need to reside on the desktop visually throughout its desktop life time. It is mainly designed to hold the JXJvm.

Since:
JD4X 1.0
Version:
0.1, 06/08/2002

Nested Class Summary
private  class JXBox.BoxMenuListener
          Detect and take action according to the selected option menu choice.
private  class JXBox.buttonHandler
          Provides the default behaviour of the box through its function buttons, this behaviour can be over written by a window manger.
private  class JXBox.rollAction
          Roll down the box to its title header.
 
Field Summary
protected  javax.swing.JPanel banner
          Container of the box and user components
private  java.awt.Container c
          Root plane of the JXBox
protected  javax.swing.JPanel container
          Container of the box and user components
protected  javax.swing.JPanel ext
          Container of the box and user components
protected  javax.swing.JToggleButton func
          Box function buttons
protected  javax.swing.JLabel header
          Title header of box
static int headerFont
          Title header font size
protected  javax.swing.ImageIcon iconDown
          Box default icons
private  int iconSize
          compoent settings
protected  javax.swing.ImageIcon iconUp
          Box default icons
private  junk.gui.window.JXWindow jxwin
          Internally implemented by a JWindow
private  int oldHeight
          compoent settings
private  int oldWidth
          compoent settings
private  int oldX
          compoent settings
private  int oldY
          compoent settings
protected  java.lang.String[] options
          Popup menu items for Box function options
protected  javax.swing.JPopupMenu popupMenu
          Box option menu
protected  javax.swing.JToggleButton roll
          Roll down action button
private  boolean toggle
          For synchronization od state of GUI
 
Constructor Summary
JXBox()
          Default constructor that initializes the neccessary utilities.
JXBox(java.lang.String title)
          Constructor with a title header for the box.
 
Method Summary
 javax.swing.JPanel getContentPane()
          Get the main container of the box.
 int getHeight()
          Get the height of the box.
 java.awt.Dimension getMinimumSize()
          Get the minimum dimension of the box.
 java.awt.Dimension getPreferredSize()
          Get the preferred dimension of the box.
 int getWidth()
          Get the width of the box.
 int getX()
          Get the top left horizontal corner of the box.
 int getY()
          Get the top left vertical corner of the box.
protected  void init()
          Initializes all needed GUI components and their support classes.
protected  void init2()
          Initializes all needed GUI components and their support classes except a title header and the rolling function.
static void main(java.lang.String[] args)
          Default invokation method to test JXBox class.
 void setBackground(java.awt.Color c)
          Set a new color for the background of the box.
 void setBounds(int x, int y, int w, int h)
          Set a new bounds for the box.
 void setEnableRolling(boolean e)
          Enable or disable the rolling action of the box.
 void setHeader(java.lang.String title)
          Set a new title header for the box.
 void setHeaderColor(java.awt.Color c)
          Set a new color for the header of the box.
 void setVisible(boolean v)
          Set the visibility of the box.
 void updateTheme()
          Set the default icon and color theme of the box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c

private java.awt.Container c
Root plane of the JXBox


jxwin

private junk.gui.window.JXWindow jxwin
Internally implemented by a JWindow


toggle

private boolean toggle
For synchronization od state of GUI


header

protected javax.swing.JLabel header
Title header of box


func

protected javax.swing.JToggleButton func
Box function buttons


iconUp

protected javax.swing.ImageIcon iconUp
Box default icons


iconDown

protected javax.swing.ImageIcon iconDown
Box default icons


roll

protected javax.swing.JToggleButton roll
Roll down action button


container

protected javax.swing.JPanel container
Container of the box and user components


ext

protected javax.swing.JPanel ext
Container of the box and user components


banner

protected javax.swing.JPanel banner
Container of the box and user components


popupMenu

protected javax.swing.JPopupMenu popupMenu
Box option menu


options

protected java.lang.String[] options
Popup menu items for Box function options


headerFont

public static int headerFont
Title header font size


oldHeight

private int oldHeight
compoent settings


oldWidth

private int oldWidth
compoent settings


oldX

private int oldX
compoent settings


oldY

private int oldY
compoent settings


iconSize

private int iconSize
compoent settings

Constructor Detail

JXBox

public JXBox()
Default constructor that initializes the neccessary utilities.


JXBox

public JXBox(java.lang.String title)
Constructor with a title header for the box.

Method Detail

getContentPane

public javax.swing.JPanel getContentPane()
Get the main container of the box.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Get the minimum dimension of the box.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Get the preferred dimension of the box.


getX

public int getX()
Get the top left horizontal corner of the box.


getY

public int getY()
Get the top left vertical corner of the box.


getWidth

public int getWidth()
Get the width of the box.


getHeight

public int getHeight()
Get the height of the box.


init

protected void init()
Initializes all needed GUI components and their support classes.


init2

protected void init2()
Initializes all needed GUI components and their support classes except a title header and the rolling function.


setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Set a new bounds for the box.


setHeader

public void setHeader(java.lang.String title)
Set a new title header for the box.


setHeaderColor

public void setHeaderColor(java.awt.Color c)
Set a new color for the header of the box.


setBackground

public void setBackground(java.awt.Color c)
Set a new color for the background of the box.


setVisible

public void setVisible(boolean v)
Set the visibility of the box.


setEnableRolling

public void setEnableRolling(boolean e)
Enable or disable the rolling action of the box.


updateTheme

public void updateTheme()
Set the default icon and color theme of the box.


main

public static void main(java.lang.String[] args)
Default invokation method to test JXBox class.