Class BasePanel

    • Constructor Detail

      • BasePanel

        public BasePanel()
        Initializes the panel.
      • BasePanel

        public BasePanel​(LayoutManager manager)
        Initializes the panel with the given layout.
        Parameters:
        manager - the layout manager to use
    • Method Detail

      • initialize

        protected void initialize()
        For initializing members.
      • initGUI

        protected void initGUI()
        For initializing the GUI.
      • finishInit

        protected void finishInit()
        finishes the initialization.
      • getParentFrame

        public Frame getParentFrame()
        Tries to determine the frame this panel is part of.
        Returns:
        the parent frame if one exists or null if not
      • getParentDialog

        public Dialog getParentDialog()
        Tries to determine the dialog this panel is part of.
        Returns:
        the parent dialog if one exists or null if not
      • getParentChild

        public Child getParentChild()
        Tries to determine the child window/frame this panel is part of.
        Returns:
        the parent child window/frame if one exists or null if not
      • getParentInternalFrame

        public JInternalFrame getParentInternalFrame()
        Tries to determine the internal frame this panel is part of.
        Returns:
        the parent internal frame if one exists or null if not
      • closeParent

        public void closeParent()
        Closes the parent dialog/frame.
      • beforeShow

        protected void beforeShow()
        Hook method just before the panel is made visible.
      • afterShow

        protected void afterShow()
        Hook method just after the panel was made visible.
      • beforeHide

        protected void beforeHide()
        Hook method just before the panel is hidden.
      • afterHide

        protected void afterHide()
        Hook method just after the panel was hidden.
      • setVisible

        public void setVisible​(boolean value)
        Displays/hides the panel.
        Overrides:
        setVisible in class JComponent
        Parameters:
        value - if true then panel is displayed otherwise hidden
      • setEnabledCascade

        protected void setEnabledCascade​(boolean enabled,
                                         Component comp)
        Sets the enabled state of itself and all of its children.
        Parameters:
        enabled - whether the panel is enabled or not
      • setEnabledCascade

        public void setEnabledCascade​(boolean enabled)
        Sets the enabled state of itself and all of its children.
        Parameters:
        enabled - whether the panel is enabled or not
      • getParentTitle

        public String getParentTitle()
        Returns the current title of the parent.
        Returns:
        the parent's title, null if not available
      • setParentTitle

        public void setParentTitle​(String value)
        Sets the new title for the parent.
        Parameters:
        value - the title to use
      • printErrorMessage

        public void printErrorMessage​(String msg)
        Outputs the error message in the console window and the console.
        Parameters:
        msg - the message to output
      • printException

        public void printException​(String msg,
                                   Exception e)
        Outputs the exception in the console window and the console.
        Parameters:
        msg - the message to output with the exception
        e - the exception to output
      • main

        public static void main​(String[] args)
                         throws Exception
        Displays the BasePanel descendant, it's classname is the first parameter, in its own frame.
        Parameters:
        args - the first parameter is the classname of the BasePanel descendant to display
        Throws:
        Exception - if something goes wrong