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

Quick Search    Search Deep

dtk.gui
Class TKWidgetMaker  view TKWidgetMaker download TKWidgetMaker.java

java.lang.Object
  extended bydtk.gui.TKWidgetMaker

public class TKWidgetMaker
extends java.lang.Object

This class creates common widgets used throughout the Toolkit GUI. It also has some all-purpose utility methods (see TKUtil for more).


Field Summary
(package private) static javax.swing.ImageIcon addressBookBullet
           
(package private) static javax.swing.ImageIcon blank
           
(package private) static javax.swing.ImageIcon blueArrow
           
(package private) static javax.swing.JLabel blueArrowLabel
           
(package private) static java.lang.String buttonOffset
           
(package private) static java.lang.String fileRootOffset
           
(package private) static javax.swing.ImageIcon helpDown
           
(package private) static javax.swing.ImageIcon helpUp
           
(package private) static java.lang.String imageOffset
           
(package private) static java.awt.Dimension spacer2
           
(package private) static java.awt.Dimension spacer5
           
 
Constructor Summary
(package private) TKWidgetMaker()
          Constructor does some one-time class static initializations accross all instantiations.
 
Method Summary
 boolean fileExists(java.lang.String f)
          Check to see if a file exists.
 javax.swing.JButton getBlankButton()
          Return a blank (transparant) button that's the same size as the help button.
 java.lang.String getButtonOffset()
          The directory offset to the common buttons.
 java.lang.String getFileRootOffset()
          The directory offset to the file root.
 javax.swing.JButton getHelpButton()
          Returns a Toolkit help button.
 javax.swing.ImageIcon getImageIcon(java.lang.String path)
          Return a tookit image by first checking for it in the local directory, then going to the jar if it's not here locally.
 java.lang.String getImageOffset()
          The directory offset to the common images.
 void setComponentSize(javax.swing.JComponent widget, int w, int h)
          Set the size of a component.
 javax.swing.JPanel threeComponentHorizPanel(javax.swing.JComponent left, javax.swing.JComponent right, javax.swing.JComponent farRight, int width, int height)
          Return a horizontal panel that holds three components - used to put a help button on the left with another component on the right.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileRootOffset

static final java.lang.String fileRootOffset
See Also:
Constant Field Values

buttonOffset

static final java.lang.String buttonOffset
See Also:
Constant Field Values

imageOffset

static final java.lang.String imageOffset
See Also:
Constant Field Values

helpUp

static javax.swing.ImageIcon helpUp

helpDown

static javax.swing.ImageIcon helpDown

blank

static javax.swing.ImageIcon blank

addressBookBullet

static javax.swing.ImageIcon addressBookBullet

blueArrow

static javax.swing.ImageIcon blueArrow

blueArrowLabel

static javax.swing.JLabel blueArrowLabel

spacer5

static java.awt.Dimension spacer5

spacer2

static java.awt.Dimension spacer2
Constructor Detail

TKWidgetMaker

TKWidgetMaker()
Constructor does some one-time class static initializations accross all instantiations.

Method Detail

getButtonOffset

public java.lang.String getButtonOffset()
The directory offset to the common buttons. Offered for convenience.


getImageOffset

public java.lang.String getImageOffset()
The directory offset to the common images. Offered for convenience.


getFileRootOffset

public java.lang.String getFileRootOffset()
The directory offset to the file root. Offered for convenience.


fileExists

public boolean fileExists(java.lang.String f)
Check to see if a file exists. Returns true if the file f exists locally in the file system or in the toolkit's jar file, otherwise returns false.


getHelpButton

public javax.swing.JButton getHelpButton()
Returns a Toolkit help button.


getBlankButton

public javax.swing.JButton getBlankButton()
Return a blank (transparant) button that's the same size as the help button. Used as a spacer.


threeComponentHorizPanel

public javax.swing.JPanel threeComponentHorizPanel(javax.swing.JComponent left,
                                                   javax.swing.JComponent right,
                                                   javax.swing.JComponent farRight,
                                                   int width,
                                                   int height)
Return a horizontal panel that holds three components - used to put a help button on the left with another component on the right. If the first parameter is null, then blank space will be placed on the left.


getImageIcon

public javax.swing.ImageIcon getImageIcon(java.lang.String path)
Return a tookit image by first checking for it in the local directory, then going to the jar if it's not here locally.


setComponentSize

public void setComponentSize(javax.swing.JComponent widget,
                             int w,
                             int h)
Set the size of a component.