public class KInternalFrame extends JInternalFrame
KInternalFrame
is a trivial extension of
JInternalFrame
that provides support for tiling the background
of the frame with an image.
The method getMainContainer()
will return the frame's
KPanel
. Add child components to the frame by adding
them to this KPanel
.
KPanel
,
Serialized FormModifier and Type | Class and Description |
---|---|
private class |
KInternalFrame._PropertyChangeListener |
private class |
KInternalFrame._WindowListener |
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private KPanel |
_main |
private KInternalFrame._PropertyChangeListener |
propListener |
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
KInternalFrame()
Construct a new
KInternalFrame that is non-resizable,
non-closable, non-maximizable, non-iconifiable, and with no title. |
KInternalFrame(String title)
Construct a new
KInternalFrame that is non-resizable,
non-closable, non-maximizable, non-iconifiable, and with the specified
title. |
KInternalFrame(String title,
boolean resizable)
Construct a new
KInternalFrame that is non-closable,
non-maximizable, non-iconifiable, and with the specified resizability and
title. |
KInternalFrame(String title,
boolean resizable,
boolean closable)
Construct a new
KInternalFrame that is non-maximizable,
non-iconifiable, and with the specified resizability, closability, and
title. |
KInternalFrame(String title,
boolean resizable,
boolean closable,
boolean maximizable)
Construct a new
KInternalFrame that is non-iconifiable, and
with the specified resizability, closability, maximizability, and
title. |
KInternalFrame(String title,
boolean resizable,
boolean closable,
boolean maximizable,
boolean iconifiable)
Construct a new
KInternalFrame with the specified
resizability, closability, maximizability, iconafiability, and title. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canClose()
Called in response to a frame close event to determine if this frame
may be closed.
|
void |
destroy()
Destroy this frame.
|
KPanel |
getMainContainer()
Get a reference to the main container (in this case, the
KPanel that is the child of the frame's content pane). |
void |
setBusyCursor(boolean flag)
Turn the busy cursor on or off for this window.
|
void |
setColor(Color color)
Set the background color.
|
void |
setTexture(Image image)
Set the background texture.
|
void |
setVisible(boolean flag)
Show or hide the frame.
|
protected void |
startFocus()
This method is called when the frame is made visible; it should
transfer focus to the appropriate child component.
|
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private KInternalFrame._PropertyChangeListener propListener
public KInternalFrame()
KInternalFrame
that is non-resizable,
non-closable, non-maximizable, non-iconifiable, and with no title.public KInternalFrame(String title)
KInternalFrame
that is non-resizable,
non-closable, non-maximizable, non-iconifiable, and with the specified
title.title
- The title for the frame.public KInternalFrame(String title, boolean resizable)
KInternalFrame
that is non-closable,
non-maximizable, non-iconifiable, and with the specified resizability and
title.title
- The title for the frame.resizable
- A flag specifying whether the frame will be resizable.public KInternalFrame(String title, boolean resizable, boolean closable)
KInternalFrame
that is non-maximizable,
non-iconifiable, and with the specified resizability, closability, and
title.title
- The title for the frame.resizable
- A flag specifying whether the frame will be resizable.closable
- A flag specifying whether the frame will be closable.public KInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
KInternalFrame
that is non-iconifiable, and
with the specified resizability, closability, maximizability, and
title.title
- The title for the frame.resizable
- A flag specifying whether the frame will be resizable.closable
- A flag specifying whether the frame will be closable.maximizable
- A flag specifying whether the frame will be
maximizable.public KInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
KInternalFrame
with the specified
resizability, closability, maximizability, iconafiability, and title.title
- The title for the frame.resizable
- A flag specifying whether the frame will be resizable.closable
- A flag specifying whether the frame will be closable.maximizable
- A flag specifying whether the frame will be
maximizable.iconifiable
- A flag specifying whether the frame will be
iconifiable.public KPanel getMainContainer()
KPanel
that is the child of the frame's content pane).public void setTexture(Image image)
image
- The image to use as the background texture for the frame.public void setColor(Color color)
color
- The new background color.protected boolean canClose()
true
if the frame is allowed to close, and
false
otherwise. The default implementation returns
true
.public void setVisible(boolean flag)
setVisible
in class JComponent
flag
- A flag specifying whether the frame should be shown or
hidden. If true
, the startFocus()
method is
called to allow the subclasser to request focus for a given child
component.startFocus()
protected void startFocus()
public void setBusyCursor(boolean flag)
flag
- If true
, the wait cursor will be set for this
window, otherwise the default cursor will be set.public void destroy()
UIChanageManager
.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses