public abstract class DWindow
extends javax.swing.JPanel
implements org.kopi.galite.visual.visual.UWindow
| Modifier and Type | Class and Description |
|---|---|
protected class |
DWindow.DUndoableEditListener |
class |
DWindow.RedoAction |
class |
DWindow.UndoAction |
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static org.kopi.vkopi.lib.ui.swing.visual.DWindow.KopiFocusManager |
focusManager |
static javax.swing.ImageIcon |
ICN_ASK |
static javax.swing.ImageIcon |
ICN_ERROR |
static javax.swing.ImageIcon |
ICN_NOTICE |
static javax.swing.ImageIcon |
ICN_WAIT |
static javax.swing.ImageIcon |
ICN_WARNING |
protected DWindow.RedoAction |
redoAction |
java.lang.Exception |
runtimeDebugInfo |
protected DWindow.UndoAction |
undoAction |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Modifier | Constructor and Description |
|---|---|
protected |
DWindow(org.kopi.galite.visual.visual.VWindow model)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static int |
askPostition(java.awt.Component parent,
int current,
int total)
Asks a position number
|
boolean |
askUser(java.lang.String message,
boolean yesIsDefault)
Displays an ask dialog box
|
boolean |
askUserImpl(java.lang.String message,
boolean yesIsDefault)
Displays an ask dialog box
|
void |
build()
Deprecated.
do not use anymore
|
void |
close()
Deprecated.
Use closeWindow() or close(int code) instead.
|
protected void |
close(int code)
Close the view and the model, definitely
|
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
|
protected void |
createEditMenu()
Allow building of a customized edit menu.
|
javax.swing.JFrame |
createFrame() |
static void |
displayError(java.awt.Component parent,
java.lang.String message) |
void |
displayError(java.lang.String message)
Displays an error message.
|
static void |
displayNotice(java.awt.Component frame,
java.lang.String message) |
void |
displayNotice(java.lang.String message)
Displays a notice.
|
void |
displayWarning(java.lang.String message)
Displays a warning message.
|
void |
fileProduced(java.io.File file,
java.lang.String name) |
protected javax.swing.Action |
getActionByName(java.lang.String name) |
javax.swing.JPanel |
getContentPanel()
Adds the specified component to the end of the content panel.
|
protected DMenuBar |
getDMenuBar() |
javax.swing.JFrame |
getFrame() |
boolean |
getInAction() |
org.kopi.galite.visual.visual.VWindow |
getModel()
Get Model
|
javax.swing.Action |
getRedoAction() |
int |
getReturnCode() |
javax.swing.event.UndoableEditListener |
getUndoableEditListener() |
javax.swing.Action |
getUndoAction() |
javax.swing.undo.UndoManager |
getUndoManager() |
void |
modelClosed(int type) |
void |
performAction(org.kopi.galite.visual.visual.Action action,
boolean block)
Deprecated.
Use method #performAsyncAction(KopiAction action) without
boolean parameter because this parameter was ignored.
|
void |
performAsyncAction(org.kopi.galite.visual.visual.Action action)
Performs the appropriate action asynchronously.
|
void |
performBasicAction(org.kopi.galite.visual.visual.Action action)
Performs the appropriate action synchronously.
|
void |
release()
Release: we definitively don't want anymore this window (JFrame)
|
void |
reportError(org.kopi.galite.visual.visual.VRuntimeException e) |
abstract void |
run()
starts the window
|
void |
setCurrentJob(int currentJob) |
void |
setInformationText(java.lang.String text)
Displays a text in the lower left corner of the window.
|
void |
setModel(org.kopi.galite.visual.visual.VWindow model)
Set model
|
void |
setProgressDialog(java.lang.String message,
int totalJobs) |
void |
setStatePanel(javax.swing.JPanel panel) |
void |
setStatisticsText(java.lang.String text)
Displays a text in the lower right corner of the window.
|
void |
setTitle(java.lang.String title)
set the title
|
void |
setTotalJobs(int totalJobs) |
void |
setUndoManager(javax.swing.undo.UndoManager undo) |
void |
setVisible(boolean b)
Show/Hide this window
|
void |
setWaitDialog(java.lang.String message,
int maxTime)
setWaitInfo
|
void |
setWaitInfo(java.lang.String message)
setWaitInfo
|
void |
setWindowFocusEnabled(boolean enabled) |
static int |
showOptionDialog(javax.swing.JFrame frame,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue)
Show a dialog with a key assignated to each button (the first letter)
|
void |
unsetProgressDialog() |
void |
unsetWaitDialog()
change mode to free state
|
void |
unsetWaitInfo()
change mode to free state
|
void |
updateWaitDialogMessage(java.lang.String message) |
protected void |
verifyNotInTransaction(java.lang.String message)
Reports iff a message is shown while in a transaction.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, updateadd, 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, validateTreeaction, 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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic java.lang.Exception runtimeDebugInfo
protected DWindow.UndoAction undoAction
protected DWindow.RedoAction redoAction
public static final javax.swing.ImageIcon ICN_WAIT
public static final javax.swing.ImageIcon ICN_ERROR
public static final javax.swing.ImageIcon ICN_WARNING
public static final javax.swing.ImageIcon ICN_ASK
public static final javax.swing.ImageIcon ICN_NOTICE
public static final org.kopi.vkopi.lib.ui.swing.visual.DWindow.KopiFocusManager focusManager
protected DWindow(org.kopi.galite.visual.visual.VWindow model)
public org.kopi.galite.visual.visual.VWindow getModel()
getModel in interface org.kopi.galite.visual.visual.UWindowpublic void setModel(org.kopi.galite.visual.visual.VWindow model)
public javax.swing.JPanel getContentPanel()
public void setWindowFocusEnabled(boolean enabled)
setWindowFocusEnabled in interface org.kopi.galite.visual.visual.UWindowpublic void setVisible(boolean b)
setVisible in interface org.kopi.galite.visual.base.UComponentsetVisible in class javax.swing.JComponentpublic void setTitle(java.lang.String title)
setTitle in interface org.kopi.galite.visual.visual.UWindowprotected void close(int code)
closeWindow()public int getReturnCode()
public void close()
public void closeWindow()
closeWindow in interface org.kopi.galite.visual.visual.UWindowpublic void modelClosed(int type)
modelClosed in interface org.kopi.galite.visual.visual.ModelCloseListenerpublic void build()
public javax.swing.JFrame getFrame()
public void displayNotice(java.lang.String message)
public static void displayNotice(java.awt.Component frame,
java.lang.String message)
public void displayError(java.lang.String message)
public static void displayError(java.awt.Component parent,
java.lang.String message)
public static int askPostition(java.awt.Component parent,
int current,
int total)
public void displayWarning(java.lang.String message)
public boolean askUser(java.lang.String message,
boolean yesIsDefault)
public boolean askUserImpl(java.lang.String message,
boolean yesIsDefault)
public javax.swing.event.UndoableEditListener getUndoableEditListener()
public javax.swing.undo.UndoManager getUndoManager()
public void setUndoManager(javax.swing.undo.UndoManager undo)
protected void createEditMenu()
protected javax.swing.Action getActionByName(java.lang.String name)
public javax.swing.Action getRedoAction()
public javax.swing.Action getUndoAction()
public void performAction(org.kopi.galite.visual.visual.Action action,
boolean block)
public void performAsyncAction(org.kopi.galite.visual.visual.Action action)
performAsyncAction in interface org.kopi.galite.visual.visual.VActionListeneraction - the action to perform.public void performBasicAction(org.kopi.galite.visual.visual.Action action)
performBasicAction in interface org.kopi.galite.visual.visual.UWindowaction - the action to perform.public void reportError(org.kopi.galite.visual.visual.VRuntimeException e)
public boolean getInAction()
public final void setInformationText(java.lang.String text)
setInformationText in interface org.kopi.galite.visual.visual.UWindowpublic final void setStatisticsText(java.lang.String text)
public final void setStatePanel(javax.swing.JPanel panel)
public final void setProgressDialog(java.lang.String message,
int totalJobs)
setProgressDialog in interface org.kopi.galite.visual.visual.ProgressDialogListenerpublic final void unsetProgressDialog()
unsetProgressDialog in interface org.kopi.galite.visual.visual.ProgressDialogListenerpublic final void setTotalJobs(int totalJobs)
setTotalJobs in interface org.kopi.galite.visual.visual.UWindowpublic final void setCurrentJob(int currentJob)
setCurrentJob in interface org.kopi.galite.visual.visual.UWindowpublic final void updateWaitDialogMessage(java.lang.String message)
updateWaitDialogMessage in interface org.kopi.galite.visual.visual.UWindowpublic final void setWaitDialog(java.lang.String message,
int maxTime)
setWaitDialog in interface org.kopi.galite.visual.visual.WaitDialogListenerpublic final void unsetWaitDialog()
unsetWaitDialog in interface org.kopi.galite.visual.visual.WaitDialogListenerpublic final void setWaitInfo(java.lang.String message)
setWaitInfo in interface org.kopi.galite.visual.visual.WaitInfoListenerpublic final void unsetWaitInfo()
unsetWaitInfo in interface org.kopi.galite.visual.visual.WaitInfoListenerpublic void fileProduced(java.io.File file,
java.lang.String name)
fileProduced in interface org.kopi.galite.visual.visual.FileProductionListenerpublic void release()
protected DMenuBar getDMenuBar()
public abstract void run()
throws org.kopi.galite.visual.visual.VException
run in interface org.kopi.galite.visual.visual.UWindoworg.kopi.galite.visual.visual.VException - an exception may be raised by triggerspublic javax.swing.JFrame createFrame()
protected void verifyNotInTransaction(java.lang.String message)
public static int showOptionDialog(javax.swing.JFrame frame,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue)