ij2x.plugin.frame
Class JXCollapsiblePaneVisualCheck

java.lang.Object
  extended by ij2x.plugin.frame.JXCollapsiblePaneVisualCheck

public class JXCollapsiblePaneVisualCheck
extends java.lang.Object


Field Summary
protected  java.awt.Point frameLocation
           
protected  boolean systemLF
           
 
Constructor Summary
JXCollapsiblePaneVisualCheck()
           
 
Method Summary
 void addAction(org.jdesktop.swingx.JXFrame frame, javax.swing.Action action)
           
 void addComponentOrientationToggle(org.jdesktop.swingx.JXFrame frame)
          Creates and adds a button toggling the frame's componentOrientation.
 void addMessage(org.jdesktop.swingx.JXFrame frame, java.lang.String message)
           
 void addSearchModeToggle(org.jdesktop.swingx.JXFrame frame)
          Creates and adds a button toggling the frame's componentOrientation.
 void addStatusComponent(org.jdesktop.swingx.JXFrame frame, javax.swing.JComponent component)
          Adds the component to the statusbar of the frame.
 void addStatusMessage(org.jdesktop.swingx.JXFrame frame, java.lang.String message)
           
protected  void createAndAddMenus(javax.swing.JMenuBar bar, javax.swing.JComponent component)
          Creates menus and adds them to the given menu bar.
protected  javax.swing.JMenuBar createAndFillMenuBar(javax.swing.JComponent component)
          Creates, fills and returns a JMenuBar.
protected  javax.swing.JMenu createPlafMenu()
          Creates a menu filled with one SetPlafAction for each of the currently installed LFs.
 org.jdesktop.swingx.JXStatusBar getStatusBar(org.jdesktop.swingx.JXFrame frame)
          Returns the JXFrame's status bar.
 void interactiveDirectionTest()
          SwingX 578: Ensure that the directions work correctly.
static boolean isCrossPlatformLF()
          Returns whether the current lf is the cross-platform lf.
static boolean isSystemLF()
          Returns whether the current lf is the system lf.
static void main(java.lang.String[] args)
           
static void setSystemLF(boolean system)
          PENDING: JW - this is about toggling the LF, does nothing to update the UI.
 void show(org.jdesktop.swingx.JXFrame frame)
          Packs and shows the frame.
 void show(org.jdesktop.swingx.JXFrame frame, int width, int height)
          Packs, sizes and shows the frame.
 org.jdesktop.swingx.JXFrame showInFrame(javax.swing.JComponent component, java.lang.String title)
          Creates, shows and returns a JXFrame with the specified title, containing the component.
 org.jdesktop.swingx.JXFrame showInFrame(javax.swing.JComponent component, java.lang.String title, boolean showMenu)
          Creates, shows and returns a JXFrame with the specified title, containing the component.
 org.jdesktop.swingx.JXFrame showWithScrollingInFrame(javax.swing.JComponent leftComp, javax.swing.JComponent rightComp, java.lang.String title)
          Creates and returns a JXFrame with the specified title, containing two components individually wrapped into a JScrollPane.
 org.jdesktop.swingx.JXFrame showWithScrollingInFrame(javax.swing.JComponent component, java.lang.String title)
          Creates, shows and returns a JXFrame with the specified title, containing the component wrapped into a JScrollPane.
 void testDummy()
          do nothing test - keep the testrunner happy.
 org.jdesktop.swingx.JXFrame wrapInFrame(javax.swing.JComponent component, java.lang.String title)
          Creates and returns a JXFrame with the specified title, containing the component.
 org.jdesktop.swingx.JXFrame wrapInFrame(javax.swing.JComponent component, java.lang.String title, boolean showMenu)
           
 org.jdesktop.swingx.JXFrame wrapWithScrollingInFrame(javax.swing.JComponent leftComp, javax.swing.JComponent rightComp, java.lang.String title)
          Creates and returns a JXFrame with the specified title, containing two components individually wrapped into a JScrollPane.
 org.jdesktop.swingx.JXFrame wrapWithScrollingInFrame(javax.swing.JComponent component, java.lang.String title)
          Creates and returns a JXFrame with the specified title, containing the component wrapped into a JScrollPane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frameLocation

protected java.awt.Point frameLocation

systemLF

protected boolean systemLF
Constructor Detail

JXCollapsiblePaneVisualCheck

public JXCollapsiblePaneVisualCheck()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

interactiveDirectionTest

public void interactiveDirectionTest()
SwingX 578: Ensure that the directions work correctly.


testDummy

public void testDummy()
do nothing test - keep the testrunner happy.


wrapWithScrollingInFrame

public org.jdesktop.swingx.JXFrame wrapWithScrollingInFrame(javax.swing.JComponent component,
                                                            java.lang.String title)
Creates and returns a JXFrame with the specified title, containing the component wrapped into a JScrollPane.

Parameters:
component - the JComponent to wrap
title - the title to show in the frame
Returns:
a configured, packed and located JXFrame.

wrapWithScrollingInFrame

public org.jdesktop.swingx.JXFrame wrapWithScrollingInFrame(javax.swing.JComponent leftComp,
                                                            javax.swing.JComponent rightComp,
                                                            java.lang.String title)
Creates and returns a JXFrame with the specified title, containing two components individually wrapped into a JScrollPane.

Parameters:
leftComp - the left JComponent to wrap
rightComp - the right JComponent to wrap
title - the title to show in the frame
Returns:
a configured, packed and located JXFrame

wrapInFrame

public org.jdesktop.swingx.JXFrame wrapInFrame(javax.swing.JComponent component,
                                               java.lang.String title)
Creates and returns a JXFrame with the specified title, containing the component. First frame get's the menubar as defined by createAndFillMenuBar. Closing the first frame will exit.

Parameters:
component - the JComponent to wrap
title - the title to show in the frame
Returns:
a configured, packed and located JXFrame.

showWithScrollingInFrame

public org.jdesktop.swingx.JXFrame showWithScrollingInFrame(javax.swing.JComponent component,
                                                            java.lang.String title)
Creates, shows and returns a JXFrame with the specified title, containing the component wrapped into a JScrollPane.

Parameters:
component - the JComponent to wrap
title - the title to show in the frame
Returns:
a configured, packed and located JXFrame.
See Also:
wrapWithScrollingInFrame(JComponent, String)

showWithScrollingInFrame

public org.jdesktop.swingx.JXFrame showWithScrollingInFrame(javax.swing.JComponent leftComp,
                                                            javax.swing.JComponent rightComp,
                                                            java.lang.String title)
Creates and returns a JXFrame with the specified title, containing two components individually wrapped into a JScrollPane.

Parameters:
leftComp - the left JComponent to wrap
rightComp - the right JComponent to wrap
title - the title to show in the frame
Returns:
a configured, packed and located JXFrame

showInFrame

public org.jdesktop.swingx.JXFrame showInFrame(javax.swing.JComponent component,
                                               java.lang.String title)
Creates, shows and returns a JXFrame with the specified title, containing the component.

Parameters:
component - the JComponent to wrap
title - the title to show in the frame
Returns:
a configured, packed and located JXFrame.

showInFrame

public org.jdesktop.swingx.JXFrame showInFrame(javax.swing.JComponent component,
                                               java.lang.String title,
                                               boolean showMenu)
Creates, shows and returns a JXFrame with the specified title, containing the component. Creates and adds a Menubar if showMenu is true.

Parameters:
component - the JComponent to wrap
title - the title to show in the frame
showMenu - flag to indicate whether a JMenuBar should be added
Returns:
a configured, packed and located JXFrame.

wrapInFrame

public org.jdesktop.swingx.JXFrame wrapInFrame(javax.swing.JComponent component,
                                               java.lang.String title,
                                               boolean showMenu)

show

public void show(org.jdesktop.swingx.JXFrame frame)
Packs and shows the frame.

Parameters:
frame -

show

public void show(org.jdesktop.swingx.JXFrame frame,
                 int width,
                 int height)
Packs, sizes and shows the frame.

Parameters:
frame -

addAction

public void addAction(org.jdesktop.swingx.JXFrame frame,
                      javax.swing.Action action)

addComponentOrientationToggle

public void addComponentOrientationToggle(org.jdesktop.swingx.JXFrame frame)
Creates and adds a button toggling the frame's componentOrientation.

Parameters:
frame -

addSearchModeToggle

public void addSearchModeToggle(org.jdesktop.swingx.JXFrame frame)
Creates and adds a button toggling the frame's componentOrientation.

Parameters:
frame -

addMessage

public void addMessage(org.jdesktop.swingx.JXFrame frame,
                       java.lang.String message)

getStatusBar

public org.jdesktop.swingx.JXStatusBar getStatusBar(org.jdesktop.swingx.JXFrame frame)
Returns the JXFrame's status bar. Lazily creates and sets an instance if necessary.

Parameters:
frame - the target frame
Returns:
the frame's statusbar

addStatusComponent

public void addStatusComponent(org.jdesktop.swingx.JXFrame frame,
                               javax.swing.JComponent component)
Adds the component to the statusbar of the frame.

Parameters:
frame -
component -

addStatusMessage

public void addStatusMessage(org.jdesktop.swingx.JXFrame frame,
                             java.lang.String message)
Parameters:
frame -
string -

createAndFillMenuBar

protected javax.swing.JMenuBar createAndFillMenuBar(javax.swing.JComponent component)
Creates, fills and returns a JMenuBar.

Parameters:
component - the component that was added to the frame.
Returns:
a menu bar filled with actions as defined in createAndAddMenus
See Also:
createAndAddMenus(javax.swing.JMenuBar, javax.swing.JComponent)

createAndAddMenus

protected void createAndAddMenus(javax.swing.JMenuBar bar,
                                 javax.swing.JComponent component)
Creates menus and adds them to the given menu bar.

This implementation adds a menu to choose the LF.

Parameters:
bar - the menubar to fill
component - the component that was added to the frame.

createPlafMenu

protected javax.swing.JMenu createPlafMenu()
Creates a menu filled with one SetPlafAction for each of the currently installed LFs.

Returns:
the menu to use for plaf switching.

setSystemLF

public static void setSystemLF(boolean system)
PENDING: JW - this is about toggling the LF, does nothing to update the UI. Check all tests using this method to see if they make sense!

Parameters:
system -

isSystemLF

public static boolean isSystemLF()
Returns whether the current lf is the system lf. It assumes that the lf is either cross-platform or system. Not really safe


isCrossPlatformLF

public static boolean isCrossPlatformLF()
Returns whether the current lf is the cross-platform lf. It assumes that the lf is either cross-platform or system. Not really safe