org.PingOO.DLAI.lib.PWidget
Class PFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--org.PingOO.DLAI.lib.PWidget.PFrame
Direct Known Subclasses:
HelpFrame, LoginWindow, PExternalDialog, PPM

public class PFrame
extends javax.swing.JFrame
implements PGUI

Here are defined the common shared methods between all gui interfaces.
A frame is, well, is a window with borders and a title bar.
A frame is also attached to its original virtual screen.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)
See Also:
JFrame, PGUI, PComponent, Serialized Form

Inner Class Summary
protected  class PFrame.PExternalMouseInputListener
          Default mouse listener used to track the mouse over this frame.
 
Inner classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
 javax.swing.event.MouseInputListener defaultMouseInputListener
          The default mouse adapter used to track the mouse over this frame.
private  PManager manager
          The manager where this component will lokk for its resources.
protected  java.lang.String module
          Defines the module where to find this frame's text and tool tip.
protected  java.lang.String titleKey
          Defines the key used to find this frame's title.
 
Fields inherited from class javax.swing.JFrame
accessibleContext, defaultCloseOperation, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis
 
Fields inherited from class java.awt.Window
active, base, focusMgr, inputContext, nameCounter, OPENED, ownedWindowList, serialVersionUID, state, warningString, weakThis, windowListener, windowSerializedDataVersion
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
PFrame()
          Creates a new frame for the interface.
PFrame(java.lang.String titleKey)
          Creates a new frame for the interface.
PFrame(java.lang.String titleKey, java.lang.String module)
          Creates a new frame for the interface.
 
Method Summary
 PManager getManager()
          Returns the manager of this component.
 java.lang.String getModule()
          Returns the component's resources location.
 java.lang.String getTextKey()
          Returns the key used to find this component's text
 java.lang.String getTitleKey()
          Returns the key used to find this frame's title.
 java.lang.String getToolTipKey()
          Returns the key used to find this frame's tool tip.
 void setLocalizedTitle(java.lang.String titleKey)
          Registers the frame title.
 void setManager(PManager manager)
          Sets the manager of this component.
 void setModule(java.lang.String module)
          Sets The module where the component will search its resources
 void updateFont()
          Update the component's font.
 void updateLanguage()
          Updates the language of the interface.
 void updateLanguage(java.lang.String module)
          Updates the language of the interface.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
, addNotify, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, initIDs, isResizable, postProcessKeyEvent, readObject, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle, writeObject
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyOrientation, countComponents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, paint, paintComponents, postsOldMouseEvents, preferredSize, print, printComponents, printOneComponent, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

titleKey

protected java.lang.String titleKey
Defines the key used to find this frame's title.

module

protected java.lang.String module
Defines the module where to find this frame's text and tool tip.

manager

private PManager manager
The manager where this component will lokk for its resources.

defaultMouseInputListener

public final javax.swing.event.MouseInputListener defaultMouseInputListener
The default mouse adapter used to track the mouse over this frame.
Constructor Detail

PFrame

public PFrame()
Creates a new frame for the interface.

PFrame

public PFrame(java.lang.String titleKey)
Creates a new frame for the interface.
Parameters:
titleKey - The key used to find this frame's title.

PFrame

public PFrame(java.lang.String titleKey,
              java.lang.String module)
Creates a new frame for the interface.
Parameters:
titleKey - The key used to find this frame's title.
module - The module from which are loaded localized resources.
Method Detail

setLocalizedTitle

public void setLocalizedTitle(java.lang.String titleKey)
Registers the frame title.
Parameters:
titlKey - The key used to get the localized title.

updateFont

public void updateFont()
Update the component's font.

updateLanguage

public void updateLanguage()
Updates the language of the interface.

updateLanguage

public void updateLanguage(java.lang.String module)
Updates the language of the interface.
Parameters:
module - The module from which are loaded localized resources.

setManager

public void setManager(PManager manager)
Sets the manager of this component.
Parameters:
manager - the new manager of this component, if manager is null, the component will use PManager.getInstance().

getManager

public PManager getManager()
Returns the manager of this component.
Returns:
The manager of this component.

setModule

public void setModule(java.lang.String module)
Sets The module where the component will search its resources
Parameters:
module - The new module. If null, the default resource set will be used.

getTextKey

public java.lang.String getTextKey()
Returns the key used to find this component's text
Returns:
The key used to find this frame's text, null if the component does not support text.

getTitleKey

public java.lang.String getTitleKey()
Returns the key used to find this frame's title.
Returns:
The key used to find this frame's title, null if the component does not support tool tip.

getToolTipKey

public java.lang.String getToolTipKey()
Returns the key used to find this frame's tool tip.
Returns:
The key used to find this frame's tool tip, null if the component does not support tool tip.

getModule

public java.lang.String getModule()
Returns the component's resources location.
Returns:
The component's resources location or PComponent.DEFAULT_MODULE if the component has no defined module