public class KahinaWindow
extends javax.swing.JFrame
implements java.awt.event.WindowListener, java.awt.event.ComponentListener
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
protected boolean |
cloned |
protected KahinaInstance<?,?,?,?> |
kahina |
protected KahinaTransferablePanel |
mainPanel |
protected javax.swing.JScrollPane |
topScrollPane |
protected int |
windowID |
KahinaWindowManager |
wm |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
KahinaWindow(KahinaWindowManager wm,
KahinaInstance<?,?,?,?> kahina)
Constructs a KahinaWindow with a new unique window ID.
|
KahinaWindow(KahinaWindowManager wm,
KahinaInstance<?,?,?,?> kahina,
int id)
Constructs a KahinaWindow with a specified window ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addSubwindow(KahinaWindow subwindow)
Adds a subwindow if there is space for it; generic handle for configuring windows.
|
void |
componentHidden(java.awt.event.ComponentEvent arg0) |
void |
componentMoved(java.awt.event.ComponentEvent arg0) |
void |
componentResized(java.awt.event.ComponentEvent arg0) |
void |
componentShown(java.awt.event.ComponentEvent arg0) |
KahinaWindow |
createDynamicClone()
Creates an exact copy of this window, with identical update behavior.
|
KahinaWindow |
createSnapshotClone()
Creates an exact copy of this window, but with immutable content.
|
void |
deregister() |
void |
flipSubwindows() |
KahinaWindow |
getEmbeddingWindow()
Retrieves the direct ancestor of this window in the embedding tree.
|
int |
getID() |
KahinaWindow |
getReplacementAfterRelease(KahinaWindow subwindow) |
int |
getWindowType()
Returns the type of the current window.
|
boolean |
isClone() |
boolean |
isContentWindow() |
boolean |
isDummyWindow() |
boolean |
isFlippableWindow() |
boolean |
isTopLevelWindow() |
void |
repaintMainPanel() |
void |
replaceSubwindow(KahinaWindow oldSubwindow,
KahinaWindow newSubwindow) |
void |
setBorder(boolean border) |
void |
setScrollable(boolean scrollable) |
void |
setSize(int width,
int height) |
void |
setTitle(java.lang.String title) |
void |
setVisible(boolean visible) |
java.lang.String |
toString() |
void |
windowActivated(java.awt.event.WindowEvent e) |
void |
windowClosed(java.awt.event.WindowEvent e) |
void |
windowClosing(java.awt.event.WindowEvent e) |
void |
windowDeactivated(java.awt.event.WindowEvent e) |
void |
windowDeiconified(java.awt.event.WindowEvent e) |
void |
windowIconified(java.awt.event.WindowEvent e) |
void |
windowOpened(java.awt.event.WindowEvent e) |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setType, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public KahinaWindowManager wm
protected KahinaTransferablePanel mainPanel
protected javax.swing.JScrollPane topScrollPane
protected final int windowID
protected boolean cloned
protected final KahinaInstance<?,?,?,?> kahina
public KahinaWindow(KahinaWindowManager wm, KahinaInstance<?,?,?,?> kahina)
wm
- the window manager that is to manage this windowpublic KahinaWindow(KahinaWindowManager wm, KahinaInstance<?,?,?,?> kahina, int id)
wm
- the window manager that is to manage this windowid
- the unique window ID that this window will be referred by (never use -1 or an ID that is already used!)public void deregister()
public int getID()
public boolean isClone()
public void setBorder(boolean border)
public void setScrollable(boolean scrollable)
public int getWindowType()
public void setTitle(java.lang.String title)
setTitle
in class java.awt.Frame
public boolean isTopLevelWindow()
public boolean isContentWindow()
public boolean isFlippableWindow()
public boolean isDummyWindow()
public void flipSubwindows()
public void setSize(int width, int height)
setSize
in class java.awt.Window
public void repaintMainPanel()
public KahinaWindow createDynamicClone()
public KahinaWindow createSnapshotClone()
public KahinaWindow getEmbeddingWindow()
public boolean addSubwindow(KahinaWindow subwindow)
subwindow
- the subwindow to be addedpublic KahinaWindow getReplacementAfterRelease(KahinaWindow subwindow)
public void replaceSubwindow(KahinaWindow oldSubwindow, KahinaWindow newSubwindow)
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public void componentHidden(java.awt.event.ComponentEvent arg0)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent arg0)
componentMoved
in interface java.awt.event.ComponentListener
public void componentResized(java.awt.event.ComponentEvent arg0)
componentResized
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent arg0)
componentShown
in interface java.awt.event.ComponentListener
public java.lang.String toString()
toString
in class java.awt.Component
public void setVisible(boolean visible)
setVisible
in class java.awt.Window