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

Quick Search    Search Deep

org.gui4j.core.impl
Class Gui4jWindowImpl  view Gui4jWindowImpl download Gui4jWindowImpl.java

java.lang.Object
  extended byorg.gui4j.core.Gui4jSwingContainer
      extended byorg.gui4j.core.impl.Gui4jWindowImpl
All Implemented Interfaces:
org.gui4j.exception.ErrorTags, org.gui4j.Gui4jWindow, org.gui4j.core.interfaces.Gui4jWindowInternal
Direct Known Subclasses:
Gui4jDialogImpl, Gui4jViewImpl

abstract class Gui4jWindowImpl
extends org.gui4j.core.Gui4jSwingContainer
implements org.gui4j.exception.ErrorTags, org.gui4j.core.interfaces.Gui4jWindowInternal


Nested Class Summary
private  class Gui4jWindowImpl.WindowHandler
           
 
Nested classes inherited from class org.gui4j.core.Gui4jSwingContainer
 
Field Summary
private  boolean center
           
private  boolean created
           
private  int height
           
private  boolean maximize
           
private  int maximizeMaxHeight
           
private  int maximizeMaxWidth
           
private  boolean maximizeSize
           
private static org.apache.commons.logging.Log mLogger
           
private  java.lang.String mTitle
           
private  java.awt.Component mToplevelComponent
           
private  java.awt.Window mWindow
           
private  boolean setSize
           
private  int width
           
private  Gui4jWindowImpl.WindowHandler windowHandler
           
private  int workingCount
           
 
Fields inherited from class org.gui4j.core.Gui4jSwingContainer
inClosing
 
Fields inherited from interface org.gui4j.exception.ErrorTags
EXCEPTION_OCCURED, PROGRAMMING_ERROR, PROGRAMMING_ERROR_illegal_access_exception, PROGRAMMING_ERROR_instantiation_exception, PROGRAMMING_ERROR_invocation_target_exception, PROGRAMMING_ERROR_method_ambiguous, PROGRAMMING_ERROR_method_not_found, PROGRAMMING_ERROR_parameter_null, RESOURCE_ERROR, RESOURCE_ERROR_access_type_not_compatible, RESOURCE_ERROR_access_unexpected_character, RESOURCE_ERROR_access_unexpected_end, RESOURCE_ERROR_access_value_type_not_defined, RESOURCE_ERROR_alias_already_defined, RESOURCE_ERROR_alias_class_not_found, RESOURCE_ERROR_alias_not_defined_in_path, RESOURCE_ERROR_alias_undefined, RESOURCE_ERROR_attribute_editable_defined, RESOURCE_ERROR_attribute_listEditable_defined, RESOURCE_ERROR_attribute_not_defined, RESOURCE_ERROR_double_DataConversionException, RESOURCE_ERROR_element_at_row_col_already_defined, RESOURCE_ERROR_gui4jComponent_already_defined, RESOURCE_ERROR_gui4jComponent_already_registered, RESOURCE_ERROR_gui4jComponent_not_defined, RESOURCE_ERROR_gui4jComponent_not_registered, RESOURCE_ERROR_int_DataConversionException, RESOURCE_ERROR_invalid_column, RESOURCE_ERROR_invalid_defaultButton, RESOURCE_ERROR_invalid_keystroke, RESOURCE_ERROR_invalid_row, RESOURCE_ERROR_invalid_url, RESOURCE_ERROR_jdom_exception, RESOURCE_ERROR_labelform_column_conflict, RESOURCE_ERROR_placement_must_contain_gui4jComponent, RESOURCE_ERROR_property_getter_type_incompatible, RESOURCE_ERROR_style_defined_twice, RESOURCE_ERROR_style_not_defined, RESOURCE_ERROR_tableLayout_invalid_col_row_str, RESOURCE_ERROR_type_not_compatible, RESOURCE_ERROR_unexpected_gui4jStyle_end, RESOURCE_ERROR_unknown_param, RESOURCE_ERROR_unknown_param_in_include
 
Constructor Summary
Gui4jWindowImpl(Gui4jImpl gui4j, java.lang.String viewResourceName, org.gui4j.Gui4jController gui4jController, java.lang.String title, boolean readOnlyMode)
          Constructor for Gui4jWindow.
 
Method Summary
private  void applySettings()
           
protected  boolean beepWhenBlocked()
           
 void center(boolean centered)
          Center the window.
private  void centerWindow()
           
abstract  void changeWindowTitle(java.lang.String title)
          This method is needed to change a frame's title
private  void clear(java.awt.Container container)
           
 void close()
          This method closes the view.
protected abstract  java.awt.Window createWindow()
           
protected abstract  void defineWindowActions()
           
 void disable()
          Sets the gui to enabled false
 void enable()
          Sets the gui to enabled true
protected  org.gui4j.util.BlockingGlassPane getBlockingGlassPane()
           
protected abstract  javax.swing.RootPaneContainer getRootPaneContainer()
           
 javax.swing.JComponent getSwingComponent(java.lang.String id)
          Returns the swing component with the given guiId.
 java.lang.String getTitle()
           
 java.awt.Window getWindow()
           
 void hide()
          Hide the window.
 boolean isBlocked()
           
 boolean isClosed()
           
 void maximize()
          Maximize the window on the desktop.
 void maximize(int maxWidth, int maxHeight)
          Maximize the window, but stop at the given dimension.
 void maximize1024x768()
          Maximize the window, but the maximum siye is limited to 1024 x 768
protected  void maximizeWindow()
          Method maximizeWindow
 org.gui4j.Gui4jWindow prepare()
          Method prepare.
protected  void requestWindowClosing()
           
 void resize()
          Resizes this view's JFrame so that all components get their preferred sizes.
 void setBusy(boolean busy)
           
 void setEnabled(boolean flag)
          Sets the enabled state.
 void setNormalCursor()
          Restores the normal cursor.
 void setVisible(boolean show)
          Shows or hides the window.
protected  void setWindow(java.awt.Window window)
           
 void setWindowSize(java.awt.Dimension d)
          Convenience method for setWindowSize(int, int) 55
 void setWindowSize(int width, int height)
          Sets the window size.
 void setWorkingCursor()
          Display the working cursor.
 void show()
          Show the window.
 void waitForGUI()
          Der Aufruf dieser Methode kehrt erst dann zurueck, wenn alle aktuell anstehenden Swing-Events abgearbeitet worden sind.
 
Methods inherited from class org.gui4j.core.Gui4jSwingContainer
addDipose, cleanUp, dispose, getComponent, getGui4j, getGui4jCallBase, getGui4jComponentContainerIncludeInstance, getGui4jComponentInstance, getGui4jComponentInstance, getGui4jComponentInstance, getGui4jController, getStorage, getToplevelAttrValue, inReadOnlyMode, isDefined, isInClosing, putStorage, refreshAll, registerForDeleteListenerOnGui4jProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gui4j.Gui4jWindow
dispose, getGui4jController, refreshAll
 

Field Detail

mLogger

private static final org.apache.commons.logging.Log mLogger

workingCount

private int workingCount

created

private boolean created

center

private boolean center

maximize

private boolean maximize

maximizeSize

private boolean maximizeSize

setSize

private boolean setSize

maximizeMaxHeight

private int maximizeMaxHeight

maximizeMaxWidth

private int maximizeMaxWidth

height

private int height

width

private int width

windowHandler

private Gui4jWindowImpl.WindowHandler windowHandler

mWindow

private java.awt.Window mWindow

mTitle

private java.lang.String mTitle

mToplevelComponent

private java.awt.Component mToplevelComponent
Constructor Detail

Gui4jWindowImpl

public Gui4jWindowImpl(Gui4jImpl gui4j,
                       java.lang.String viewResourceName,
                       org.gui4j.Gui4jController gui4jController,
                       java.lang.String title,
                       boolean readOnlyMode)
Constructor for Gui4jWindow.

Method Detail

waitForGUI

public void waitForGUI()
Der Aufruf dieser Methode kehrt erst dann zurueck, wenn alle aktuell anstehenden Swing-Events abgearbeitet worden sind.

Specified by:
waitForGUI in interface org.gui4j.Gui4jWindow

prepare

public org.gui4j.Gui4jWindow prepare()
Method prepare. Muss aufgerufen werden, bevor show, hide oder setVisible aufgerufen werden

Specified by:
prepare in interface org.gui4j.Gui4jWindow

setVisible

public void setVisible(boolean show)
Description copied from interface: org.gui4j.Gui4jWindow
Shows or hides the window.

Specified by:
setVisible in interface org.gui4j.Gui4jWindow

close

public void close()
This method closes the view. If the view is not open, nothing happens

Specified by:
close in interface org.gui4j.Gui4jWindow

show

public void show()
Description copied from interface: org.gui4j.Gui4jWindow
Show the window.

Specified by:
show in interface org.gui4j.Gui4jWindow

hide

public void hide()
Description copied from interface: org.gui4j.Gui4jWindow
Hide the window.

Specified by:
hide in interface org.gui4j.Gui4jWindow

requestWindowClosing

protected final void requestWindowClosing()

beepWhenBlocked

protected final boolean beepWhenBlocked()

clear

private void clear(java.awt.Container container)

applySettings

private void applySettings()

isClosed

public boolean isClosed()
Specified by:
isClosed in interface org.gui4j.Gui4jWindow

maximizeWindow

protected void maximizeWindow()
Method maximizeWindow


resize

public void resize()
Resizes this view's JFrame so that all components get their preferred sizes.

Specified by:
resize in interface org.gui4j.Gui4jWindow

getWindow

public final java.awt.Window getWindow()
Specified by:
getWindow in interface org.gui4j.Gui4jWindow

getRootPaneContainer

protected abstract javax.swing.RootPaneContainer getRootPaneContainer()

createWindow

protected abstract java.awt.Window createWindow()

defineWindowActions

protected abstract void defineWindowActions()

getBlockingGlassPane

protected org.gui4j.util.BlockingGlassPane getBlockingGlassPane()

changeWindowTitle

public abstract void changeWindowTitle(java.lang.String title)
This method is needed to change a frame's title

Specified by:
changeWindowTitle in interface org.gui4j.Gui4jWindow

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface org.gui4j.Gui4jWindow

maximize

public void maximize()
Description copied from interface: org.gui4j.Gui4jWindow
Maximize the window on the desktop.

Specified by:
maximize in interface org.gui4j.Gui4jWindow

maximize

public void maximize(int maxWidth,
                     int maxHeight)
Description copied from interface: org.gui4j.Gui4jWindow
Maximize the window, but stop at the given dimension.

Specified by:
maximize in interface org.gui4j.Gui4jWindow

maximize1024x768

public void maximize1024x768()
Description copied from interface: org.gui4j.Gui4jWindow
Maximize the window, but the maximum siye is limited to 1024 x 768

Specified by:
maximize1024x768 in interface org.gui4j.Gui4jWindow

center

public void center(boolean centered)
Description copied from interface: org.gui4j.Gui4jWindow
Center the window.

Specified by:
center in interface org.gui4j.Gui4jWindow

setWindowSize

public void setWindowSize(java.awt.Dimension d)
Convenience method for setWindowSize(int, int) 55

Specified by:
setWindowSize in interface org.gui4j.Gui4jWindow

setWindowSize

public void setWindowSize(int width,
                          int height)
Description copied from interface: org.gui4j.Gui4jWindow
Sets the window size.

Specified by:
setWindowSize in interface org.gui4j.Gui4jWindow

centerWindow

private void centerWindow()

setWorkingCursor

public void setWorkingCursor()
Description copied from interface: org.gui4j.Gui4jWindow
Display the working cursor. A counter variable remembers the the number of calls of setWorkingCursor and setNormalCursor, so that only the last call of setNormalCursor really displays the normal cursor.

Specified by:
setWorkingCursor in interface org.gui4j.Gui4jWindow

setNormalCursor

public void setNormalCursor()
Description copied from interface: org.gui4j.Gui4jWindow
Restores the normal cursor. See setWorkingCursor.

Specified by:
setNormalCursor in interface org.gui4j.Gui4jWindow

isBlocked

public boolean isBlocked()
Specified by:
isBlocked in interface org.gui4j.Gui4jWindow

setBusy

public void setBusy(boolean busy)
Specified by:
setBusy in interface org.gui4j.Gui4jWindow

disable

public void disable()
Description copied from interface: org.gui4j.Gui4jWindow
Sets the gui to enabled false

Specified by:
disable in interface org.gui4j.Gui4jWindow

enable

public void enable()
Description copied from interface: org.gui4j.Gui4jWindow
Sets the gui to enabled true

Specified by:
enable in interface org.gui4j.Gui4jWindow

setEnabled

public void setEnabled(boolean flag)
Description copied from interface: org.gui4j.Gui4jWindow
Sets the enabled state.

Specified by:
setEnabled in interface org.gui4j.Gui4jWindow

setWindow

protected void setWindow(java.awt.Window window)

getSwingComponent

public javax.swing.JComponent getSwingComponent(java.lang.String id)
Description copied from interface: org.gui4j.Gui4jWindow
Returns the swing component with the given guiId.

Specified by:
getSwingComponent in interface org.gui4j.Gui4jWindow