Class FWTabView

java.lang.Object
net.simplace.ui.tabview.FWTabView
All Implemented Interfaces:
ActionListener, EventListener, Observer, ChangeListener, HyperlinkListener

public class FWTabView extends Object implements ActionListener, ChangeListener, HyperlinkListener, Observer
Toolkit for arranging multiple extern panels in one target panel. Just add the 'target'-panel to the desired viewcontainer. Now u can create panels and use them as usuall (etc. adding some widgets, setting viewport...). The manager will provide one tab/view if there are * views. It also provides a popup with the default actions - close all views. - close this view.
Author:
Andreas Enders
  • Field Details

    • DESKTOP_ID

      public static final String DESKTOP_ID
      Constant-ID for the desktop.
      See Also:
    • iViewMap

      protected final LinkedHashMap<Object,JPanel> iViewMap
      Map containing the views(value) and their ids (key).
    • iTabbedPane

      protected final FWTabViewPane iTabbedPane
      Tabbedpane for displaying multiple views.
  • Constructor Details

    • FWTabView

      protected FWTabView(boolean aShowDesktopTab)
      Default constructor. Initiates the basic elements.
      Parameters:
      aShowDesktopTab -
  • Method Details

    • getInstance

      public static FWTabView getInstance()
      Returns the only instance of this class.
      Returns:
    • createView

      public boolean createView(Object aID, String aCaption, JPanel aView, String aSystemID)
      Parameters:
      aID -
      aCaption -
      aView -
      aSystemID -
      Returns:
      true, if the view was created successfully, otherwise returns false
    • createView

      public boolean createView(Object aID, JPanel aView, String aSystemID)
      Parameters:
      aID -
      aCaption -
      aView -
      aSystemID -
      aIcon -
      aFormrenderer -
      Returns:
      true, if the view was created successfully, otherwise returns false
    • disposeView

      public void disposeView(Object aID, boolean aShouldBeApproved)
      Parameters:
      aID -
      aShouldBeApproved -
    • disposeAll

      public void disposeAll()
    • disposeAll

      public void disposeAll(boolean aLeaveCurrent, boolean aForceDispose)
      Parameters:
      aLeaveCurrent -
      aForceDispose -
    • selectView

      public void selectView(Object aID)
      Parameters:
      aID -
    • getSelectedView

      public Component getSelectedView()
      Returns:
      Component at selected index
    • getView

      public Component getView(Object aOID)
      Returns the view for the given oid.
      Parameters:
      aOID -
      Returns:
    • getSelectedViewID

      public Object getSelectedViewID()
      Returns:
      selected view ID
    • closeSelectedView

      public void closeSelectedView(boolean aSuppressApproving)
      Parameters:
      aSuppressApproving -
      aApproveQuestion -
    • isViewVisible

      public boolean isViewVisible(String aViewID)
      Returns whether or not there is an existing view with the given id.
      Parameters:
      aViewID -
      Returns:
    • getTabCount

      public int getTabCount()
      Returns:
      number of tabs
    • getTargetPanel

      public JPanel getTargetPanel()
      Returns:
      target Panel
    • actionPerformed

      public void actionPerformed(ActionEvent aActionEvent)
      Specified by:
      actionPerformed in interface ActionListener
    • fireActionEvent

      public void fireActionEvent(ActionListener aActionListener, String aCommand)
      Parameters:
      aActionListener -
      aCommand -
    • stateChanged

      public void stateChanged(ChangeEvent aChangeEvent)
      Informs the listeners when a view is selected.
      Specified by:
      stateChanged in interface ChangeListener
    • addViewManagerListener

      public void addViewManagerListener(FWTabViewListener aListener)
      Parameters:
      aListener -
    • removeViewManagerListener

      public void removeViewManagerListener(FWTabViewListener aListener)
      Parameters:
      aListener -
    • hyperlinkUpdate

      public void hyperlinkUpdate(HyperlinkEvent aHyperlinkEvent)
      This method is called when a click action is performed on a Link.It sets an HTMLtext to JEditorPane
      Specified by:
      hyperlinkUpdate in interface HyperlinkListener
    • setTabPlacement

      public void setTabPlacement(int aOrientation)
      Sets a new orientation to the tabpane.
      Parameters:
      aOrientation -
    • setEmptyPanel

      public void setEmptyPanel(JPanel aNewEmptyPanel)
      Replaces the emptyPanel.
      Parameters:
      aNewEmptyPanel -
    • getIDOfComponent

      public Object getIDOfComponent(JPanel aComponent)
      Sets a new title for the given id.
      Parameters:
      aComponent -
      Returns:
    • hasView

      public boolean hasView(Object aID)
      indicates if a given view is already opened
      Parameters:
      aID -
      Returns:
      true, if a given view is already opened, otherwise returns false
    • update

      public void update(Observable aObservable, Object aEvent)
      Specified by:
      update in interface Observer
    • setWaitCursor

      public void setWaitCursor(String aSystemID)
      Parameters:
      aSystemID -
    • setDefaultCursor

      public void setDefaultCursor(String aSystemID)
      Parameters:
      aSystemID -