com.vlsolutions.swing.docking

Class DockingSelectorDialog

public class DockingSelectorDialog extends JDialog

A Helper class providing information about the visibility of user components.

This dialog shows which user components are docked, auto-hidden, not visible, and is capable of dynamicaly altering the dockingpanel layout on user selection (for example, to show an unvisible component).

User components shown are those which are already docked and those which have been registered with the registerDockableComponent() method of DockingPanel.

Example of usage :

 Frame f = ...  // frame containing the docking panel
 DockingPanel dockingPanel = ...
 DockingSelectorDialog dlg = new DockingSelectorDialog(f);
 dlg.setDockingPanel(dockingPanel);
 dlg.pack();
 dlg.setLocationRelativeTo(f);
 dlg.setVisible(true); // modal

 // optional
 if (dlg.getClosingState() == DockingSelectorDialog.CONFIRM){
    // do something more
 }
 

See Also:

Field Summary
static intCANCEL
Closing state of the dialog when the user has selected the cancel option
static intCONFIRM
Closing state of the dialog when the user has selected the confirm option
Constructor Summary
DockingSelectorDialog()
Default constructor.
DockingSelectorDialog(Dialog owner)
Constructor for Dialog parent window.
DockingSelectorDialog(Frame owner)
Constructor for Frame parent window.
Method Summary
intgetClosingState()
Returns the users close choice as CONFIRM or CANCEL (remember this dialog is modal).
voidsetCancelButtonText(String text)
Change the cancel button text (hook for i18n)
voidsetCancelButtonTooltipText(String text)
Change the cancel button tootip text (hook for i18n)
voidsetConfirmButtonText(String text)
Change the confirm button text (hook for i18n)
voidsetConfirmButtonTooltipText(String text)
Change the confirm button tooltip text (hook for i18n)
voidsetDockingDesktop(DockingDesktop desktop)
Requiered to initialize this dialog.
voidsetWizardLabelText(String wizardLabelText)
Change the wizard label text (an explanation of the behaviour of this dialog).

Field Detail

CANCEL

public static final int CANCEL
Closing state of the dialog when the user has selected the cancel option

See Also: getClosingState

CONFIRM

public static final int CONFIRM
Closing state of the dialog when the user has selected the confirm option

See Also: getClosingState

Constructor Detail

DockingSelectorDialog

public DockingSelectorDialog()
Default constructor.

modal dialog with DISPOSE_ON_CLOSE option, needs a pack() and setVisible(true) after creation

DockingSelectorDialog

public DockingSelectorDialog(Dialog owner)
Constructor for Dialog parent window.

modal dialog with DISPOSE_ON_CLOSE option, needs a pack() and setVisible(true) after creation.

DockingSelectorDialog

public DockingSelectorDialog(Frame owner)
Constructor for Frame parent window.

modal dialog with DISPOSE_ON_CLOSE option, needs a pack() and setVisible(true) after creation.

Method Detail

getClosingState

public int getClosingState()
Returns the users close choice as CONFIRM or CANCEL (remember this dialog is modal).

Use this method if you need to know how is was closed. If the used has confirmed, the docking panel is automaticaly updated by the confirm button action.

setCancelButtonText

public void setCancelButtonText(String text)
Change the cancel button text (hook for i18n)

setCancelButtonTooltipText

public void setCancelButtonTooltipText(String text)
Change the cancel button tootip text (hook for i18n)

setConfirmButtonText

public void setConfirmButtonText(String text)
Change the confirm button text (hook for i18n)

setConfirmButtonTooltipText

public void setConfirmButtonTooltipText(String text)
Change the confirm button tooltip text (hook for i18n)

setDockingDesktop

public void setDockingDesktop(DockingDesktop desktop)
Requiered to initialize this dialog.

Invoke this method before packing the dialog.

setWizardLabelText

public void setWizardLabelText(String wizardLabelText)
Change the wizard label text (an explanation of the behaviour of this dialog).

HTML format is supported like in any JLabel.

© Copyright 2004-2007 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications