|
SkinLF Version 1.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--javax.swing.JWindow
|
+--com.l2fprod.gui.grieves.graphics.JExternalFrame
Do not remove these comments under penalty of my displeasure.I'm not smart like those GNU guys, so I'll just say briefly that you can pretty much do what you want with this software, except: 1. Sue me if it doesn't work or causes you any problems. 2. Claim that you (or anyone other than me) wrote it. 3. Sell it to anyone.
See my website for more info on JExternalFrame.
JExternalFrame tries to combine the functionality and pluggable L & F of a JInternalFrame with the top-level status of a Window or Frame. You use it just like a JFrame (except I wouldn't recommend doing any fancy stuff with setContentPane, setGlassPane, or setLayeredPane.) Call getContentPane() and set the layout, add components, etc. Then, throw it out on your screen somewhere with a pack() and a setVisible(true).
You can also programmatically minimize it & iconize it just like a JInternalFrame using setIcon() & setMaximum(). Unfortunately, since it's really just a JWindow in disguise, it won't actually go down to the task bar in Windows 95/98/NT like a JFrame will.
Because the window is drawn using a JInternalFrame, it will use whatever your current Look & Feel is for a JInternalFrame. This means it can look like a Metal Frame. Pretty cool, huh?
JInternalFrame,
Serialized Form| Field Summary | |
static int |
SCREEN_HEIGHT
Used for maximizing the frame |
static int |
SCREEN_WIDTH
Used for maximizing the frame |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JExternalFrame()
This method works more like the zero-arg constructor for JFrame than JInternalFrame because I replace JFrames with it. |
|
JExternalFrame(java.lang.String title)
Make a JExternalFrame with the given title; resizable, closable, maximizable, iconifiable |
|
JExternalFrame(java.lang.String title,
boolean resizable)
Like above, but can control resizability |
|
JExternalFrame(java.lang.String title,
boolean resizable,
boolean closable)
Like above, but can control closability |
|
JExternalFrame(java.lang.String title,
boolean resizable,
boolean closable,
boolean maximizable)
Like above, but can control maximizability |
|
JExternalFrame(java.lang.String title,
boolean resizable,
boolean closable,
boolean maximizable,
boolean iconifiable)
Like above, but can control iconifiability |
|
| Method Summary | |
java.awt.Container |
getContentPane()
Use the container returned by getContentPane() to put your stuff in. |
int |
getDefaultCloseOperation()
What should the frame do when the user clicks the close button? This should be one of the constants from WindowConstants. |
javax.swing.Icon |
getFrameIcon()
What icon is the frame currently displaying? |
javax.swing.JMenuBar |
getJMenuBar()
The JMenuBar this frame is currently showing. |
java.lang.String |
getTitle()
The title of the frame |
boolean |
isClosable()
Is the frame closable? |
boolean |
isClosed()
Is the frame currently closed? |
boolean |
isIcon()
Is the frame iconified? |
boolean |
isIconifiable()
Can the frame be iconified? |
boolean |
isMaximizable()
Can the frame be maximized? |
boolean |
isMaximum()
Is the frame maximized? |
boolean |
isResizable()
Can the frame be resized? |
boolean |
isSelected()
Is the frame currently selected? |
void |
pack()
Do that packing thing. |
void |
setBounds(int x,
int y,
int width,
int height)
Set the size and location of the frame |
void |
setClosable(boolean Closable)
Set whether the frame can be closed. |
void |
setClosed(boolean Closed)
Close the window. |
void |
setDefaultCloseOperation(int dco)
Tell the frame what action it should take when the user tries to close it. |
void |
setFrameIcon(javax.swing.Icon icon)
Set the icon the frame should display |
void |
setIcon(boolean Icon)
Iconify / Deiconify the frame. |
void |
setIconifiable(boolean Iconifiable)
|
void |
setJMenuBar(javax.swing.JMenuBar m)
Give the frame a menu bar to use. |
void |
setMaximizable(boolean Maximizable)
Set whether the frame can be maximized. |
void |
setMaximum(boolean Maximum)
Maximize / Demaximize the frame. |
void |
setResizable(boolean Resizable)
Set whether the frame can be resized. |
void |
setSelected(boolean Selected)
Set whether the frame is selected. |
void |
setTitle(java.lang.String title)
Change the title of the frame |
void |
setVisible(boolean visible)
Show / hide the frame |
| Methods inherited from class javax.swing.JWindow |
getAccessibleContext, getGlassPane, getLayeredPane, getRootPane, remove, setContentPane, setGlassPane, setLayeredPane, setLayout, update |
| Methods inherited from class java.awt.Window |
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SCREEN_WIDTH
public static final int SCREEN_HEIGHT
| Constructor Detail |
public JExternalFrame()
public JExternalFrame(java.lang.String title)
title - Put this title on top of the frame
public JExternalFrame(java.lang.String title,
boolean resizable)
title - Put this title on top of the frameresizable - Can the user resize the window?
public JExternalFrame(java.lang.String title,
boolean resizable,
boolean closable)
title - Put this title on top of the frameresizable - Can the user resize the window?closable - Can the user close the window?
public JExternalFrame(java.lang.String title,
boolean resizable,
boolean closable,
boolean maximizable)
title - Put this title on top of the frameresizable - Can the user resize the window?closable - Can the user close the window?maximizable - Can the user maximize the window?
public JExternalFrame(java.lang.String title,
boolean resizable,
boolean closable,
boolean maximizable,
boolean iconifiable)
title - Put this title on top of the frameresizable - Can the user resize the window?closable - Can the user close the window?maximizable - Can the user maximize the window?iconifiable - Can the user iconify the window?| Method Detail |
public java.awt.Container getContentPane()
getContentPane in interface javax.swing.RootPaneContainergetContentPane in class javax.swing.JWindowpublic int getDefaultCloseOperation()
WindowConstantspublic void setDefaultCloseOperation(int dco)
dco - The new Default Close OperationWindowConstantspublic javax.swing.JMenuBar getJMenuBar()
public java.lang.String getTitle()
public boolean isClosable()
public boolean isClosed()
public boolean isIcon()
public boolean isIconifiable()
public boolean isMaximizable()
public boolean isMaximum()
public boolean isResizable()
public boolean isSelected()
public void setClosable(boolean Closable)
public void setClosed(boolean Closed)
throws java.beans.PropertyVetoException
java.beans.PropertyVetoException - If it wants to.
public void setIcon(boolean Icon)
throws java.beans.PropertyVetoException
java.beans.PropertyVetoException - If it wants to.
public void setMaximum(boolean Maximum)
throws java.beans.PropertyVetoException
java.beans.PropertyVetoException - If it wants to.public void setMaximizable(boolean Maximizable)
public void setIconifiable(boolean Iconifiable)
public void setResizable(boolean Resizable)
public void setSelected(boolean Selected)
throws java.beans.PropertyVetoException
java.beans.PropertyVetoException - If it wants to.public void setJMenuBar(javax.swing.JMenuBar m)
public void setTitle(java.lang.String title)
public javax.swing.Icon getFrameIcon()
public void setFrameIcon(javax.swing.Icon icon)
public void pack()
pack in class java.awt.Window
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class java.awt.Componentpublic void setVisible(boolean visible)
setVisible in class java.awt.Component
|
SkinLF Version 1.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||