ucar.unidata.ui
Class MultiFrame

java.lang.Object
  extended by ucar.unidata.ui.MultiFrame
Direct Known Subclasses:
IdvWindow

public class MultiFrame
extends Object

A class that holds either a JFrame or a JInteralFrame. It allows for client code to eqaily switch between regular windows and JDesktop windows

Author:
IDV development team

Constructor Summary
MultiFrame()
          ctor
MultiFrame(JFrame frame)
          ctor
MultiFrame(JInternalFrame internalFrame)
          ctor
MultiFrame(String title)
          ctor
 
Method Summary
 void addWindowListener(WindowListener l)
          wrapper method
 void dispose()
          dispose of the component
 Rectangle getBounds()
          wrapper method
 Component getComponent()
          Return the component.
 Container getContainer()
          Get the container
 Container getContentPane()
          Get the content pane of the component
 JFrame getFrame()
          access the JFrame
 JInternalFrame getInternalFrame()
          Access the internal frame
 Point getLocation()
          wrapper method
 Dimension getSize()
          wrapper method
 int getState()
          wrapper method
 String getTitle()
          Get the title
 Window getWindow()
          Finds the Window we are a part of
 boolean isShowing()
          wrapper method
 boolean isVisible()
          wrapper method
 void pack()
          wrapper method
 void removeWindowListener(WindowListener l)
          wrapper method
 void setBounds(Rectangle bounds)
          wrapper method
 void setCursor(Cursor cursor)
          Set the cursor
 void setDefaultCloseOperation(int operation)
          wrapper method
 void setIconImage(Image icon)
          wrapper method
 void setJMenuBar(JMenuBar menuBar)
          wrapper method
 void setLocation(int x, int y)
          wrapper method
 void setSize(Dimension size)
          wrapper method
 void setState(int state)
          wrapper method
 void setTitle(String title)
          Set the title
 void setVisible(boolean visible)
          set visibility of the component
 void show()
          Show the component
 void toFront()
          wrapper method
static void useDesktopPane(JDesktopPane desktopPane)
          Set the global desktopPane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiFrame

public MultiFrame()
ctor


MultiFrame

public MultiFrame(String title)
ctor

Parameters:
title - Create a JFrame with the given title

MultiFrame

public MultiFrame(JFrame frame)
ctor

Parameters:
frame - The frame

MultiFrame

public MultiFrame(JInternalFrame internalFrame)
ctor

Parameters:
internalFrame - The internal frame
Method Detail

useDesktopPane

public static void useDesktopPane(JDesktopPane desktopPane)
Set the global desktopPane. This causes all default MultiFrames to be an internalFrame.

Parameters:
desktopPane - desktop pane

show

public void show()
Show the component


dispose

public void dispose()
dispose of the component


setVisible

public void setVisible(boolean visible)
set visibility of the component

Parameters:
visible - visible

getContentPane

public Container getContentPane()
Get the content pane of the component

Returns:
content pane

getContainer

public Container getContainer()
Get the container

Returns:
Either the frame or the internalFrame

setCursor

public void setCursor(Cursor cursor)
Set the cursor

Parameters:
cursor - cursor

setState

public void setState(int state)
wrapper method

Parameters:
state - state

setTitle

public void setTitle(String title)
Set the title

Parameters:
title - The title

getTitle

public String getTitle()
Get the title

Returns:
The title

getFrame

public JFrame getFrame()
access the JFrame

Returns:
The frame

getInternalFrame

public JInternalFrame getInternalFrame()
Access the internal frame

Returns:
internal frame

getWindow

public Window getWindow()
Finds the Window we are a part of

Returns:
the window

pack

public void pack()
wrapper method


setDefaultCloseOperation

public void setDefaultCloseOperation(int operation)
wrapper method

Parameters:
operation - operation

addWindowListener

public void addWindowListener(WindowListener l)
wrapper method

Parameters:
l - listener

removeWindowListener

public void removeWindowListener(WindowListener l)
wrapper method

Parameters:
l - _more_

setJMenuBar

public void setJMenuBar(JMenuBar menuBar)
wrapper method

Parameters:
menuBar - _more_

getBounds

public Rectangle getBounds()
wrapper method

Returns:
_more_

setBounds

public void setBounds(Rectangle bounds)
wrapper method

Parameters:
bounds - _more_

setIconImage

public void setIconImage(Image icon)
wrapper method

Parameters:
icon - _more_

toFront

public void toFront()
wrapper method


getComponent

public Component getComponent()
Return the component. Either the frame or the internalFrame

Returns:
The component

isVisible

public boolean isVisible()
wrapper method

Returns:
is visible

isShowing

public boolean isShowing()
wrapper method

Returns:
is showing

getLocation

public Point getLocation()
wrapper method

Returns:
location

setLocation

public void setLocation(int x,
                        int y)
wrapper method

Parameters:
x - x
y - y

setSize

public void setSize(Dimension size)
wrapper method

Parameters:
size - size_

getSize

public Dimension getSize()
wrapper method

Returns:
size

getState

public int getState()
wrapper method

Returns:
state