JavaView© v3.95.000

jvx.project
Class PjWorkshop_Dialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjv.object.PsDialog
                      extended byjvx.project.PjWorkshop_Dialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, PsUpdateIf, java.io.Serializable, java.awt.event.WindowListener

public class PjWorkshop_Dialog
extends PsDialog

Dialog for displaying the info panel of a workshop. The workshop is registered as parent of this dialog, and a new info panel of the workshop is displayed in the center of this dialog, plus an optional notice message in the north and a panel with dialog buttons in the south.

The info panel of the workshop is registered as ActionListener of this dialog. Pressing either dialog button will fire an ActionEvent in PsDialog that is then handled by the info panel PjWorkshop_IP. PjWorkshop_IP will call methods corresponding to button events. This mechanism allows that the dialog has a universal use for all workshops in JavaView.

See Also:
PjWorkshop_IP, Serialized Form

Field Summary
 
Fields inherited from class jv.object.PsDialog
BUTTON_CANCEL, BUTTON_CLEAR, BUTTON_CLOSE, BUTTON_HIDE, BUTTON_LOAD, BUTTON_OK, BUTTON_RESET, BUTTON_SAVE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PjWorkshop_Dialog()
          Constructor of dialog, dialog is not modal.
PjWorkshop_Dialog(boolean modal)
          Constructor of dialog to show the info panel of a workshop.
PjWorkshop_Dialog(java.lang.String title, boolean modal)
          Constructor of dialog to show the info panel of a workshop.
 
Method Summary
static PsPanel createNotice(java.lang.String text)
          Create a panel showing a user notice given as text with line breaks.
 void init()
          Initialization method sets the layout manager to BorderLayout.
 void setPanel(PjWorkshop_IP panel)
          Assign an inspector panel to be used to fill this dialog.
 void setParent(PsUpdateIf object)
          Assign the parent workshop and perform a layout of the dialog.
 boolean update(java.lang.Object event)
          Update the class whenever a child has changed.
 void windowClosed(java.awt.event.WindowEvent event)
          Catch closing of a dialog by the window manager and call parent workshop's cancel() method.
 
Methods inherited from class jv.object.PsDialog
actionPerformed, addActionListener, getBottomButtons, getFather, getUserAction, instanceOf, removeActionListener, reset, setHeader, windowActivated, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, 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, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.object.PsUpdateIf
getName
 

Constructor Detail

PjWorkshop_Dialog

public PjWorkshop_Dialog()
Constructor of dialog, dialog is not modal.


PjWorkshop_Dialog

public PjWorkshop_Dialog(boolean modal)
Constructor of dialog to show the info panel of a workshop.

Parameters:
modal - true if dialog is modal

PjWorkshop_Dialog

public PjWorkshop_Dialog(java.lang.String title,
                         boolean modal)
Constructor of dialog to show the info panel of a workshop.

Parameters:
title - title of the dialog
modal - true if dialog is modal
Method Detail

init

public void init()
Initialization method sets the layout manager to BorderLayout.

Overrides:
init in class PsDialog

setPanel

public void setPanel(PjWorkshop_IP panel)
Assign an inspector panel to be used to fill this dialog.

Usually this method is called indirectly when a parent workshop is assigned to this dialog. Then this method is invoked with a new default inspector panel.

If a user wants to register a different inspector panel, then this panel must be created outside and registered using this method. After registration, the workshop registers as usual as parent using setParent().

Currently, this method does not register the info panel of the workshop as action listener in order to receive button events.

Parameters:
panel - Must be an instance of jvx.project.PjWorkshop_IP.
Since:
JavaView v.3.23.002

setParent

public void setParent(PsUpdateIf object)
Assign the parent workshop and perform a layout of the dialog. Create a new info panel of the workshop and add it to the center of this dialog. Also add a notice message and a panel with bottom buttons.

Dialog title of the info panel is set as title of the dialog. If the title of the info panel shows the same string as the requested dialog title then the title label is removed from the info panel.

The info panel of the workshop is registered as action listener in order to receive button events.

Specified by:
setParent in interface PsUpdateIf
Overrides:
setParent in class PsDialog
Parameters:
object - Must be an instance of jvx.project.PjWorkshop.
See Also:
PsDialog.getFather(), PsDialog.update(Object)

update

public boolean update(java.lang.Object event)
Update the class whenever a child has changed. Method is usually invoked from the children.

This method basically returns true if the event is the workshop. More functionality might be added by subclasses of this dialog.

Specified by:
update in interface PsUpdateIf
Overrides:
update in class PsDialog
Since:
JavaView 2.43
See Also:
PsDialog.getFather(), PsDialog.setParent(PsUpdateIf)

createNotice

public static PsPanel createNotice(java.lang.String text)
Create a panel showing a user notice given as text with line breaks. The panel is not added to a container yet. The text is displayed in a PsMultiLineLabel which automatically breaks the text at the border of the panel and at user requested line break characters.

Parameters:
text - text including line breaks "\n".
Returns:
panel with notice message, must be added to some container.

windowClosed

public void windowClosed(java.awt.event.WindowEvent event)
Catch closing of a dialog by the window manager and call parent workshop's cancel() method. If we arrive here and the parent is non-null, then the user has closed the dialog using the window manager, and this is considered a cancellation of the workshop.

Specified by:
windowClosed in interface java.awt.event.WindowListener
Overrides:
windowClosed in class PsDialog

JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.