Holger's
Java API

com.antelmann.util.gui
Class JMainFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by com.antelmann.util.gui.JMainFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
AlarmClockFrame, BackupFrame, CompareFrame, EmailClientFrame, EmailWatcherFrame, FontViewer, FormFrame, ImageLoaderFrame, ImageViewerFrame, JCDChecker, JCDCol, JCDColBrowser, JChat, JFTP, JJukeBox, JMessenger, JNewsletterManager, JPasswordHash, JPlayer, JSpider, JWebBrowser, PropertiesEditorFrame, SchedulerFrame, TextViewerFrame

public class JMainFrame
extends JFrame

a convenient JFrame providing some basic nice stuff

Author:
Holger Antelmann
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  boolean hasStatusBar
           
protected  Logger logger
          Deprecated. 
protected  JPanel statusBar
           
protected  JLabel statusLabel
          represents the status text if constructed with a status bar
protected  boolean verbose
          Deprecated. 
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JMainFrame()
           
JMainFrame(Component content)
           
JMainFrame(Component content, boolean withDefaultMenu, boolean withStatusBar)
          places the given Component in the center of the content pane using BorderLayout
JMainFrame(Component content, boolean withDefaultMenu, boolean withStatusBar, GraphicsConfiguration gc)
          places the given Component in the center of the content pane using BorderLayout
JMainFrame(String name)
           
JMainFrame(String name, boolean withMenu, boolean withStatusBar)
          if withStatusBar is set, the content pane will be using BorderLayout and places the status bar SOUTH
 
Method Summary
 void complain(String text)
          Deprecated. 
 void dispose()
          overwritten to avoid memory leaks as of JDK 1.6
 String getStatusText()
           
 boolean hasStatusBar()
          returns true if the object was constructed with a status bar displayed at BorderLayout.SOUTH of the content pane
protected  void initStatusBar()
           
 void say(String text)
          Deprecated. 
 void setCentralContent(Component content, boolean pack)
           
 void setStatusText(String text)
           
 void updateStatusText(String text)
          Deprecated. 
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

logger

@Deprecated
protected Logger logger
Deprecated. 
used if verbose is true


hasStatusBar

protected boolean hasStatusBar
See Also:
hasStatusBar()

statusLabel

protected JLabel statusLabel
represents the status text if constructed with a status bar


statusBar

protected JPanel statusBar

verbose

@Deprecated
protected boolean verbose
Deprecated. 
if true, the methods say() and complain() write to out and err respectively; if false, calls to those methods are ignored

See Also:
say(String), complain(String)
Constructor Detail

JMainFrame

public JMainFrame()

JMainFrame

public JMainFrame(String name)

JMainFrame

public JMainFrame(Component content)

JMainFrame

public JMainFrame(String name,
                  boolean withMenu,
                  boolean withStatusBar)
if withStatusBar is set, the content pane will be using BorderLayout and places the status bar SOUTH


JMainFrame

public JMainFrame(Component content,
                  boolean withDefaultMenu,
                  boolean withStatusBar)
places the given Component in the center of the content pane using BorderLayout


JMainFrame

public JMainFrame(Component content,
                  boolean withDefaultMenu,
                  boolean withStatusBar,
                  GraphicsConfiguration gc)
places the given Component in the center of the content pane using BorderLayout

Method Detail

setCentralContent

public void setCentralContent(Component content,
                              boolean pack)

dispose

public void dispose()
overwritten to avoid memory leaks as of JDK 1.6

Overrides:
dispose in class Window

initStatusBar

protected void initStatusBar()

getStatusText

public String getStatusText()

setStatusText

public void setStatusText(String text)

updateStatusText

@Deprecated
public void updateStatusText(String text)
Deprecated. 

use setStatusText instead


hasStatusBar

public boolean hasStatusBar()
returns true if the object was constructed with a status bar displayed at BorderLayout.SOUTH of the content pane


say

@Deprecated
public void say(String text)
Deprecated. 

writes the text to out if verbose is true (and also writes the msg to the logger if not null)


complain

@Deprecated
public void complain(String text)
Deprecated. 

writes the text to err if verbose is true (and also writes the msg to the logger if not null)



(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads