Class FWDefaultPanel

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
FWChartPanel, FWFormPanel, FWImagePanel, FWInternalBrowserPanel, FWPDFPanel, FWProgressViewPanel, FWXMLEditorPanel, SimEnvGraphPanel

public class FWDefaultPanel extends JPanel implements ActionListener
Panel with specific Layout als default for the TabView Panels. Please overwrite it resp. use it by setting Panels to ViewPanel with implemented ScrollPane and VFlowLayout. You can set other LayoutManager if necesarry. Methods go(),cancel(),back() and print() can be implemented by using Listeners of TabView or just overwrite the methods here.
Author:
Andreas Enders
See Also:
  • Field Details

  • Constructor Details

    • FWDefaultPanel

      public FWDefaultPanel(FWAbstractFunctionality aFunctionality)
      Creates the panel with navigation buttons.
      Parameters:
      aFunctionality - the functionality shown by this panel
    • FWDefaultPanel

      public FWDefaultPanel(FWAbstractFunctionality aFunctionality, boolean aUseButtons)
      Creates the panel; without functionality neither view panel nor buttons are created.
      Parameters:
      aFunctionality - the functionality shown by this panel, or null
      aUseButtons - whether the button bar (print, export, info, reset, cancel, back, go) is added
    • FWDefaultPanel

      public FWDefaultPanel()
      Creates the panel without functionality and without buttons.
  • Method Details

    • setComponentToView

      public void setComponentToView(Component aComponentToView)
      Displays a certain component in the center of the panel. The previously displayed component is automatically removed from the panel.
      Parameters:
      aComponentToView - the component to show
    • actionPerformed

      public void actionPerformed(ActionEvent aEvent)
      Specified by:
      actionPerformed in interface ActionListener
    • cancel

      protected void cancel()
      called from action performed - you can overwrite it in extended class or use this
    • reset

      protected void reset()
      called from action performed - you have to overwrite it in extended class for things to happen
    • go

      protected void go()
      called from action performed - you can overwrite it in extended class or use this
    • print

      protected void print()
      called from action performed - you can overwrite it in extended class or use this
    • export

      protected void export()
      called from action performed - you can overwrite it in extended class or use this
    • info

      protected void info(Object aInfoLocation)
      called from action performed - you can overwrite it in extended class or use this. Opens the info location in the external browser.
      Parameters:
      aInfoLocation - URL of the info (parameter tokens are replaced), or null for the info location of the system
    • back

      protected void back()
      called from action performed - you can overwrite it in extended class or use this
    • getLocaleValue

      protected String getLocaleValue(String aKey)
      Reads the localised text <locale prefix>.DefaultPanel.<key> from LocaleBundle.
      Parameters:
      aKey - key of the text
      Returns:
      the localised text
    • setBackButtonEnabled

      public void setBackButtonEnabled(boolean aIsEnabledBackButton)
      Parameters:
      aIsEnabledBackButton - enabled state of the back button
    • setCancelButtonEnabled

      public void setCancelButtonEnabled(boolean aIsEnabled)
      Parameters:
      aIsEnabled - enabled state of the cancel button
    • setGoButtonEnabled

      public void setGoButtonEnabled(boolean aIsEnabled)
      Parameters:
      aIsEnabled - enabled state of the go button
    • setPrintButtonEnabled

      public void setPrintButtonEnabled(boolean aIsEnabled)
      Parameters:
      aIsEnabled - enabled state of the print button
    • setExportButtonEnabled

      public void setExportButtonEnabled(boolean aIsEnabled)
      Parameters:
      aIsEnabled - enabled state and visibility of the export button
    • setInfoButtonEnabled

      public void setInfoButtonEnabled(boolean aIsEnabled)
      Parameters:
      aIsEnabled - enabled state of the info button
    • setResetButtonEnabled

      public void setResetButtonEnabled(boolean aIsVisible)
      Parameters:
      aIsVisible - visibility of the reset button
    • getFunctionality

      public FWAbstractFunctionality getFunctionality()
      Returns:
      the functionality shown by this panel, or null