Class 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

public abstract class DWindow extends JPanel implements org.kopi.galite.visual.UWindow
This class displays a window with a menu, a tool bar, a content panel and a footbar
See Also:
  • Field Details

    • runtimeDebugInfo

      public Exception runtimeDebugInfo
    • undoAction

      protected DWindow.UndoAction undoAction
    • redoAction

      protected DWindow.RedoAction redoAction
    • ICN_WAIT

      public static final ImageIcon ICN_WAIT
    • ICN_ERROR

      public static final ImageIcon ICN_ERROR
    • ICN_WARNING

      public static final ImageIcon ICN_WARNING
    • ICN_ASK

      public static final ImageIcon ICN_ASK
    • ICN_NOTICE

      public static final ImageIcon 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:
      getModel in interface org.kopi.galite.visual.UWindow
    • setModel

      public void setModel(org.kopi.galite.visual.VWindow model)
      Set model
    • getContentPanel

      public JPanel getContentPanel()
      Adds the specified component to the end of the content panel.
    • setWindowFocusEnabled

      public void setWindowFocusEnabled(boolean enabled)
      Specified by:
      setWindowFocusEnabled in interface org.kopi.galite.visual.UWindow
    • setVisible

      public void setVisible(boolean b)
      Show/Hide this window
      Specified by:
      setVisible in interface org.kopi.galite.visual.base.UComponent
      Overrides:
      setVisible in class JComponent
    • setTitle

      public void setTitle(String title)
      set the title
      Specified by:
      setTitle in interface org.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:
      closeWindow in interface org.kopi.galite.visual.UWindow
    • modelClosed

      public void modelClosed(int type)
      Specified by:
      modelClosed in interface org.kopi.galite.visual.ModelCloseListener
    • build

      public void build()
      Deprecated.
      do not use anymore
      Builds the display structure
    • getFrame

      public JFrame getFrame()
    • displayNotice

      public void displayNotice(String message)
      Displays a notice.
    • displayNotice

      public static void displayNotice(Component frame, String message)
    • displayError

      public void displayError(String message)
      Displays an error message.
    • displayError

      public static void displayError(Component parent, String message)
    • askPostition

      public static int askPostition(Component parent, int current, int total)
      Asks a position number
    • displayWarning

      public void displayWarning(String message)
      Displays a warning message.
    • askUser

      public boolean askUser(String message, boolean yesIsDefault)
      Displays an ask dialog box
    • askUserImpl

      public boolean askUserImpl(String message, boolean yesIsDefault)
      Displays an ask dialog box
    • getUndoableEditListener

      public UndoableEditListener getUndoableEditListener()
    • getUndoManager

      public UndoManager getUndoManager()
    • setUndoManager

      public void setUndoManager(UndoManager undo)
    • createEditMenu

      protected void createEditMenu()
      Allow building of a customized edit menu.
    • getActionByName

      protected Action getActionByName(String name)
    • getRedoAction

      public Action getRedoAction()
    • getUndoAction

      public Action 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:
      performAsyncAction in interface org.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:
      performBasicAction in interface org.kopi.galite.visual.UWindow
      Parameters:
      action - the action to perform.
    • openURL

      public void openURL(String url) throws Exception
      Specified by:
      openURL in interface org.kopi.galite.visual.UWindow
      Throws:
      Exception
    • reportError

      public void reportError(org.kopi.galite.visual.VRuntimeException e)
    • getInAction

      public boolean getInAction()
    • setInformationText

      public final void setInformationText(String text)
      Displays a text in the lower left corner of the window.
      Specified by:
      setInformationText in interface org.kopi.galite.visual.UWindow
    • setStatisticsText

      public final void setStatisticsText(String text)
      Displays a text in the lower right corner of the window.
    • setStatePanel

      public final void setStatePanel(JPanel panel)
    • setProgressDialog

      public final void setProgressDialog(String message, int totalJobs)
      Specified by:
      setProgressDialog in interface org.kopi.galite.visual.ProgressDialogListener
    • unsetProgressDialog

      public final void unsetProgressDialog()
      Specified by:
      unsetProgressDialog in interface org.kopi.galite.visual.ProgressDialogListener
    • setTotalJobs

      public final void setTotalJobs(int totalJobs)
      Specified by:
      setTotalJobs in interface org.kopi.galite.visual.UWindow
    • setCurrentJob

      public final void setCurrentJob(int currentJob)
      Specified by:
      setCurrentJob in interface org.kopi.galite.visual.UWindow
    • updateWaitDialogMessage

      public final void updateWaitDialogMessage(String message)
      Specified by:
      updateWaitDialogMessage in interface org.kopi.galite.visual.UWindow
    • setWaitDialog

      public final void setWaitDialog(String message, int maxTime)
      setWaitInfo
      Specified by:
      setWaitDialog in interface org.kopi.galite.visual.WaitDialogListener
    • unsetWaitDialog

      public final void unsetWaitDialog()
      change mode to free state
      Specified by:
      unsetWaitDialog in interface org.kopi.galite.visual.WaitDialogListener
    • setWaitInfo

      public final void setWaitInfo(String message)
      setWaitInfo
      Specified by:
      setWaitInfo in interface org.kopi.galite.visual.WaitInfoListener
    • unsetWaitInfo

      public final void unsetWaitInfo()
      change mode to free state
      Specified by:
      unsetWaitInfo in interface org.kopi.galite.visual.WaitInfoListener
    • fileProduced

      public void fileProduced(File file, String name)
      Specified by:
      fileProduced in interface org.kopi.galite.visual.FileProductionListener
    • release

      public void release()
      Release: we definitively don't want anymore this window (JFrame)
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.kopi.galite.visual.ModelCloseListener
    • getDMenuBar

      protected DMenuBar getDMenuBar()
    • run

      public abstract void run() throws org.kopi.galite.visual.VException
      starts the window
      Specified by:
      run in interface org.kopi.galite.visual.UWindow
      Throws:
      org.kopi.galite.visual.VException - an exception may be raised by triggers
    • createFrame

      public JFrame createFrame()
    • verifyNotInTransaction

      protected void verifyNotInTransaction(String message)
      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)