Class DWindow
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.kopi.vkopi.lib.ui.swing.visual.DWindow
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,EventListener,Accessible,org.kopi.galite.visual.base.UComponent,org.kopi.galite.visual.FileProductionListener,org.kopi.galite.visual.ModelCloseListener,org.kopi.galite.visual.ProgressDialogListener,org.kopi.galite.visual.UWindow,org.kopi.galite.visual.VActionListener,org.kopi.galite.visual.WaitDialogListener,org.kopi.galite.visual.WaitInfoListener
- Direct Known Subclasses:
DChart,DForm,DItemTree,DPreviewWindow,DReport
This class displays a window with a menu, a tool bar, a content panel
and a footbar
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classclassclassNested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.kopi.vkopi.lib.ui.swing.visual.DWindow.KopiFocusManagerstatic final ImageIconstatic final ImageIconstatic final ImageIconstatic final ImageIconstatic final ImageIconprotected DWindow.RedoActionprotected DWindow.UndoActionFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDWindow(org.kopi.galite.visual.VWindow model) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic intaskPostition(Component parent, int current, int total) Asks a position numberbooleanDisplays an ask dialog boxbooleanaskUserImpl(String message, boolean yesIsDefault) Displays an ask dialog boxvoidbuild()Deprecated.do not use anymorevoidclose()Deprecated.Use closeWindow() or close(int code) instead.protected voidclose(int code) Close the view and the model, definitelyvoidCalled to close the view (from the user), it does not definitly close the view(it may ask the user before) Allowed to call outside the event disp. threadprotected voidAllow building of a customized edit menu.static voiddisplayError(Component parent, String message) voiddisplayError(String message) Displays an error message.static voiddisplayNotice(Component frame, String message) voiddisplayNotice(String message) Displays a notice.voiddisplayWarning(String message) Displays a warning message.voiddispose()voidfileProduced(File file, String name) protected ActiongetActionByName(String name) Adds the specified component to the end of the content panel.protected DMenuBargetFrame()booleanorg.kopi.galite.visual.VWindowgetModel()Get ModelintvoidmodelClosed(int type) voidvoidperformAction(org.kopi.galite.visual.Action action, boolean block) Deprecated.Use method #performAsyncAction(KopiAction action) without boolean parameter because this parameter was ignored.voidperformAsyncAction(org.kopi.galite.visual.Action action) Performs the appropriate action asynchronously.voidperformBasicAction(org.kopi.galite.visual.Action action) Performs the appropriate action synchronously.voidrelease()Release: we definitively don't want anymore this window (JFrame)voidreportError(org.kopi.galite.visual.VRuntimeException e) abstract voidrun()starts the windowfinal voidsetCurrentJob(int currentJob) final voidsetInformationText(String text) Displays a text in the lower left corner of the window.voidsetModel(org.kopi.galite.visual.VWindow model) Set modelfinal voidsetProgressDialog(String message, int totalJobs) final voidsetStatePanel(JPanel panel) final voidsetStatisticsText(String text) Displays a text in the lower right corner of the window.voidset the titlefinal voidsetTotalJobs(int totalJobs) voidsetUndoManager(UndoManager undo) voidsetVisible(boolean b) Show/Hide this windowfinal voidsetWaitDialog(String message, int maxTime) setWaitInfofinal voidsetWaitInfo(String message) setWaitInfovoidsetWindowFocusEnabled(boolean enabled) static intshowOptionDialog(JFrame frame, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) Show a dialog with a key assignated to each button (the first letter)final voidfinal voidchange mode to free statefinal voidchange mode to free statefinal voidupdateWaitDialogMessage(String message) protected voidverifyNotInTransaction(String message) Reports if a message is shown while in a transaction.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kopi.galite.visual.base.UComponent
isEnabled, isVisible, setEnabled
-
Field Details
-
runtimeDebugInfo
-
undoAction
-
redoAction
-
ICN_WAIT
-
ICN_ERROR
-
ICN_WARNING
-
ICN_ASK
-
ICN_NOTICE
-
focusManager
public static final org.kopi.vkopi.lib.ui.swing.visual.DWindow.KopiFocusManager focusManager
-
-
Constructor Details
-
DWindow
protected DWindow(org.kopi.galite.visual.VWindow model) Constructor
-
-
Method Details
-
getModel
public org.kopi.galite.visual.VWindow getModel()Get Model- Specified by:
getModelin interfaceorg.kopi.galite.visual.UWindow
-
setModel
public void setModel(org.kopi.galite.visual.VWindow model) Set model -
getContentPanel
Adds the specified component to the end of the content panel. -
setWindowFocusEnabled
public void setWindowFocusEnabled(boolean enabled) - Specified by:
setWindowFocusEnabledin interfaceorg.kopi.galite.visual.UWindow
-
setVisible
public void setVisible(boolean b) Show/Hide this window- Specified by:
setVisiblein interfaceorg.kopi.galite.visual.base.UComponent- Overrides:
setVisiblein classJComponent
-
setTitle
set the title- Specified by:
setTitlein interfaceorg.kopi.galite.visual.UWindow
-
close
protected void close(int code) Close the view and the model, definitely- See Also:
-
getReturnCode
public int getReturnCode() -
close
public void close()Deprecated.Use closeWindow() or close(int code) instead. -
closeWindow
public void closeWindow()Called to close the view (from the user), it does not definitly close the view(it may ask the user before) Allowed to call outside the event disp. thread- Specified by:
closeWindowin interfaceorg.kopi.galite.visual.UWindow
-
modelClosed
public void modelClosed(int type) - Specified by:
modelClosedin interfaceorg.kopi.galite.visual.ModelCloseListener
-
build
public void build()Deprecated.do not use anymoreBuilds the display structure -
getFrame
-
displayNotice
Displays a notice. -
displayNotice
-
displayError
Displays an error message. -
displayError
-
askPostition
Asks a position number -
displayWarning
Displays a warning message. -
askUser
Displays an ask dialog box -
askUserImpl
Displays an ask dialog box -
getUndoableEditListener
-
getUndoManager
-
setUndoManager
-
createEditMenu
protected void createEditMenu()Allow building of a customized edit menu. -
getActionByName
-
getRedoAction
-
getUndoAction
-
performAction
public void performAction(org.kopi.galite.visual.Action action, boolean block) Deprecated.Use method #performAsyncAction(KopiAction action) without boolean parameter because this parameter was ignored. -
performAsyncAction
public void performAsyncAction(org.kopi.galite.visual.Action action) Performs the appropriate action asynchronously. You can use this method to perform any operation out of the UI event process- Specified by:
performAsyncActionin interfaceorg.kopi.galite.visual.VActionListener- Parameters:
action- the action to perform.
-
performBasicAction
public void performBasicAction(org.kopi.galite.visual.Action action) Performs the appropriate action synchronously.- Specified by:
performBasicActionin interfaceorg.kopi.galite.visual.UWindow- Parameters:
action- the action to perform.
-
openURL
- Specified by:
openURLin interfaceorg.kopi.galite.visual.UWindow- Throws:
Exception
-
reportError
public void reportError(org.kopi.galite.visual.VRuntimeException e) -
getInAction
public boolean getInAction() -
setInformationText
Displays a text in the lower left corner of the window.- Specified by:
setInformationTextin interfaceorg.kopi.galite.visual.UWindow
-
setStatisticsText
Displays a text in the lower right corner of the window. -
setStatePanel
-
setProgressDialog
- Specified by:
setProgressDialogin interfaceorg.kopi.galite.visual.ProgressDialogListener
-
unsetProgressDialog
public final void unsetProgressDialog()- Specified by:
unsetProgressDialogin interfaceorg.kopi.galite.visual.ProgressDialogListener
-
setTotalJobs
public final void setTotalJobs(int totalJobs) - Specified by:
setTotalJobsin interfaceorg.kopi.galite.visual.UWindow
-
setCurrentJob
public final void setCurrentJob(int currentJob) - Specified by:
setCurrentJobin interfaceorg.kopi.galite.visual.UWindow
-
updateWaitDialogMessage
- Specified by:
updateWaitDialogMessagein interfaceorg.kopi.galite.visual.UWindow
-
setWaitDialog
setWaitInfo- Specified by:
setWaitDialogin interfaceorg.kopi.galite.visual.WaitDialogListener
-
unsetWaitDialog
public final void unsetWaitDialog()change mode to free state- Specified by:
unsetWaitDialogin interfaceorg.kopi.galite.visual.WaitDialogListener
-
setWaitInfo
setWaitInfo- Specified by:
setWaitInfoin interfaceorg.kopi.galite.visual.WaitInfoListener
-
unsetWaitInfo
public final void unsetWaitInfo()change mode to free state- Specified by:
unsetWaitInfoin interfaceorg.kopi.galite.visual.WaitInfoListener
-
fileProduced
- Specified by:
fileProducedin interfaceorg.kopi.galite.visual.FileProductionListener
-
release
public void release()Release: we definitively don't want anymore this window (JFrame) -
dispose
public void dispose()- Specified by:
disposein interfaceorg.kopi.galite.visual.ModelCloseListener
-
getDMenuBar
-
run
public abstract void run() throws org.kopi.galite.visual.VExceptionstarts the window- Specified by:
runin interfaceorg.kopi.galite.visual.UWindow- Throws:
org.kopi.galite.visual.VException- an exception may be raised by triggers
-
createFrame
-
verifyNotInTransaction
Reports if a message is shown while in a transaction. -
showOptionDialog
public static int showOptionDialog(JFrame frame, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) Show a dialog with a key assignated to each button (the first letter)
-