Class awt.DisplayItemWindow
All Packages This Package Previous Next
Class awt.DisplayItemWindow
java.lang.Object
|
+----awt.Component
|
+----awt.Container
|
+----awt.Window
|
+----awt.DisplayItemWindow
-
public class
DisplayItemWindow
-
extends Window
DisplayItemWindow is a subclass of Window that can display embedded
DisplayItem's. This task involves mainly distributing input to the
right DisplayItem and causing the appropriate items to be displayed
in response to damage or scrolling events.
-
Version:
-
1.43 10 Apr 1995
-
Author:
-
Jonathan Payne
-
currentInputItem
-
-
fm
-
-
logicalHeight
-
-
logicalWidth
-
-
scrollX
-
-
scrollY
-
-
stickyTracking
-
-
valid
-
-
DisplayItemWindow(Frame, String)
-
Creates a DisplayItemWindow that is contained inside a Frame.
-
DisplayItemWindow(Window, String)
-
Creates a DisplayItemWindow that is contained inside a Window
-
addItem(DisplayItem, String)
-
Adds an named DisplayItem to the window.
-
addItem(DisplayItem)
-
Adds an unnamed DisplayItem to the window.
-
addNativeItem(NativeDisplayItem)
-
Adds a DisplayItem that is a subclass of NativeDisplayItem.
-
addUpdateRequest(DIWUpdateRequest)
-
-
clearItems()
-
Clears the list of DisplayItems for this window.
-
clearNativeItems()
-
Clears the list of native display items.
-
count()
-
Returns the number of DisplayItem's contained in this window.
-
dragAbsolute(int)
-
-
getItems()
-
Returns the array of items in this window.
-
getScrollY()
-
-
handleExpose(int, int, int, int)
-
Callback for exposing a region of a window.
-
handleResize()
-
Called in response to a resize action by the user.
-
invalidate()
-
Indicates that this DisplayItemWindow needs updating.
-
keyPressed(Event)
-
Override this method to take some action when a key is pressed
in this window.
-
lineDown()
-
-
lineUp()
-
-
locateItem(int, int)
-
Returns the DisplayItem which contains x,y.
-
map()
-
Shows this window.
-
mouseDown(Event)
-
Forwards a mouseDown event to the DisplayItem that contains the
current mouse coordinates.
-
mouseDrag(Event)
-
Forwards a mouse drag event to the DisplayItem that contains the
current mouse coordinates.
-
mouseMoved(Event)
-
Forwards a mouse motion event to the DisplayItem that contains the
current mouse coordinates.
-
mouseUp(Event)
-
Override this method to take some action when the mouse button
is released.
-
nthItem(int)
-
Returns the item at the given index.
-
pageDown()
-
-
pageUp()
-
-
paint()
-
Paints all of the DisplayItems in this window.
-
paintChild(DisplayItem, boolean)
-
Requests that the given DisplayItem be repainted.
-
scrollAbsolute(int, int)
-
-
scrollHorizontally(int)
-
-
scrollVertically(int)
-
-
setScrollbar(Scrollbar)
-
Set the scrollbar for this DisplayItemWindow to s
-
setScrolling(int, int)
-
-
setSticky(boolean)
-
-
unMap()
-
Hides this window.
-
updateChild(DisplayItem, boolean)
-
Updates the given DisplayItem.
-
updateScrollbar()
-
Updates the scrollbar to reflect the current size of the
window.
-
validate()
-
Marks this window as valid (not in need of repainting)
logicalWidth
protected int logicalWidth
logicalHeight
protected int logicalHeight
currentInputItem
protected DisplayItem currentInputItem
stickyTracking
protected boolean stickyTracking
valid
protected boolean valid
scrollX
protected int scrollX
scrollY
protected int scrollY
fm
public FocusManager fm
DisplayItemWindow
public DisplayItemWindow(Frame f,
String name)
-
Creates a DisplayItemWindow that is contained inside a Frame.
DisplayItemWindow
public DisplayItemWindow(Window parent,
String client)
-
Creates a DisplayItemWindow that is contained inside a Window
setScrollbar
public void setScrollbar(Scrollbar s)
-
Set the scrollbar for this DisplayItemWindow to s
invalidate
public void invalidate()
-
Indicates that this DisplayItemWindow needs updating.
updateScrollbar
public void updateScrollbar()
-
Updates the scrollbar to reflect the current size of the
window.
validate
public void validate()
-
Marks this window as valid (not in need of repainting)
handleExpose
public synchronized void handleExpose(int x,
int y,
int w,
int h)
-
Callback for exposing a region of a window.
-
Overrides:
-
handleExpose in class Window
handleResize
public void handleResize()
-
Called in response to a resize action by the user. Redoes the
window layout and marks the window as invalid.
-
Overrides:
-
handleResize in class Window
addItem
public synchronized void addItem(DisplayItem di,
String name)
-
Adds an named DisplayItem to the window.
addItem
public synchronized void addItem(DisplayItem di)
-
Adds an unnamed DisplayItem to the window.
getItems
public DisplayItem getItems()
-
Returns the array of items in this window.
addNativeItem
protected synchronized void addNativeItem(NativeDisplayItem di)
-
Adds a DisplayItem that is a subclass of NativeDisplayItem.
This method is needed because DisplayItem's that are native
gui components require special treatment.
-
See Also:
-
NativeDisplayItem
clearNativeItems
protected synchronized void clearNativeItems()
-
Clears the list of native display items.
nthItem
public DisplayItem nthItem(int n)
-
Returns the item at the given index.
clearItems
public synchronized void clearItems()
-
Clears the list of DisplayItems for this window. The deactivate
method is called on each item before being removed from the list.
-
See Also:
-
deactivate
count
public int count()
-
Returns the number of DisplayItem's contained in this window.
setScrolling
public void setScrolling(int x,
int y)
paint
public void paint()
-
Paints all of the DisplayItems in this window.
-
Overrides:
-
paint in class Window
map
public void map()
-
Shows this window.
-
Overrides:
-
map in class Window
unMap
public void unMap()
-
Hides this window.
-
Overrides:
-
unMap in class Window
paintChild
public void paintChild(DisplayItem di,
boolean clear)
-
Requests that the given DisplayItem be repainted.
updateChild
public void updateChild(DisplayItem di,
boolean clear)
-
Updates the given DisplayItem.
addUpdateRequest
public void addUpdateRequest(DIWUpdateRequest r)
locateItem
public synchronized DisplayItem locateItem(int x,
int y)
-
Returns the DisplayItem which contains x,y.
mouseDown
public void mouseDown(Event e)
-
Forwards a mouseDown event to the DisplayItem that contains the
current mouse coordinates.
-
Overrides:
-
mouseDown in class Window
mouseDrag
public void mouseDrag(Event e)
-
Forwards a mouse drag event to the DisplayItem that contains the
current mouse coordinates.
-
Overrides:
-
mouseDrag in class Window
mouseMoved
public void mouseMoved(Event e)
-
Forwards a mouse motion event to the DisplayItem that contains the
current mouse coordinates.
-
Overrides:
-
mouseMoved in class Window
mouseUp
public void mouseUp(Event e)
-
Override this method to take some action when the mouse button
is released.
-
Overrides:
-
mouseUp in class Window
setSticky
public void setSticky(boolean on)
getScrollY
public int getScrollY()
scrollAbsolute
public void scrollAbsolute(int x,
int y)
scrollHorizontally
public synchronized boolean scrollHorizontally(int dx)
scrollVertically
public synchronized boolean scrollVertically(int dy)
lineUp
public void lineUp()
lineDown
public void lineDown()
pageUp
public void pageUp()
pageDown
public void pageDown()
dragAbsolute
public void dragAbsolute(int value)
keyPressed
public void keyPressed(Event event)
-
Override this method to take some action when a key is pressed
in this window.
-
Overrides:
-
keyPressed in class Window
All Packages This Package Previous Next