public class WindowResizeListener
extends java.awt.event.MouseAdapter
| Modifier and Type | Class and Description |
|---|---|
static class |
WindowMouseListener.ToolkitListenerHelper |
static class |
WindowResizeListener.ToolkitListener |
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Component |
myContent |
protected static boolean |
ourIsResizing |
| Constructor and Description |
|---|
WindowResizeListener(java.awt.Component content,
javax.swing.Icon corner) |
WindowResizeListener(java.awt.Component content,
java.awt.Insets border,
javax.swing.Icon corner) |
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.Component |
getContent(java.awt.event.MouseEvent event)
Returns a window content which is used to find corresponding window and to set a cursor.
|
protected java.awt.Dimension |
getMinimumSize(java.awt.Component comp)
Note: default implementation takes Component.getTreeLock()
|
protected java.awt.Insets |
getResizeBorder(java.awt.Component view) |
protected java.awt.Insets |
getResizeOffset(java.awt.Component view) |
protected java.awt.Component |
getView(java.awt.Component component)
Finds a movable/resizable view for the specified content.
|
boolean |
isBusy()
Returns
true if a window is now moving/resizing. |
protected boolean |
isDisabled(java.awt.Component view) |
void |
mouseClicked(java.awt.event.MouseEvent event) |
void |
mouseDragged(java.awt.event.MouseEvent event) |
void |
mouseMoved(java.awt.event.MouseEvent event) |
void |
mousePressed(java.awt.event.MouseEvent event) |
void |
mouseReleased(java.awt.event.MouseEvent event) |
protected void |
notifyMoved() |
protected void |
notifyResized() |
protected void |
setBounds(java.awt.Component comp,
java.awt.Rectangle bounds)
Note: default implementation takes Component.getTreeLock()
|
protected void |
setCursor(java.awt.Component content,
java.awt.Cursor cursor)
Sets the specified cursor for the specified content.
|
protected void |
setCursorType(int cursorType) |
protected final java.awt.Component myContent
protected static boolean ourIsResizing
public WindowResizeListener(java.awt.Component content,
java.awt.Insets border,
javax.swing.Icon corner)
border - the border insets specify different areas to resizecorner - the corner icon specifies the Mac-specific area to resizepublic WindowResizeListener(java.awt.Component content,
javax.swing.Icon corner)
content - the window content to find a window, or null to use a component from a mouse eventcorner - the corner icon that specifies a Mac-specific area to resizeprotected java.awt.Insets getResizeOffset(java.awt.Component view)
view - the component to resizeprotected java.awt.Insets getResizeBorder(java.awt.Component view)
view - the component to resizeprotected boolean isDisabled(java.awt.Component view)
view - the component to move/resizetrue if the specified component cannot be moved/resized, or false otherwiseprotected void setCursorType(int cursorType)
protected java.awt.Dimension getMinimumSize(java.awt.Component comp)
public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class java.awt.event.MouseAdapterpublic void mousePressed(java.awt.event.MouseEvent event)
mousePressed in interface java.awt.event.MouseListenermousePressed in class java.awt.event.MouseAdapterpublic void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class java.awt.event.MouseAdapterpublic void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class java.awt.event.MouseAdapterpublic void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class java.awt.event.MouseAdapterprotected void setBounds(java.awt.Component comp,
java.awt.Rectangle bounds)
protected java.awt.Component getContent(java.awt.event.MouseEvent event)
protected java.awt.Component getView(java.awt.Component component)
protected void setCursor(java.awt.Component content,
java.awt.Cursor cursor)
public boolean isBusy()
true if a window is now moving/resizing.protected void notifyMoved()
protected void notifyResized()