public abstract class AbstractResizeHotSpot extends AbstractHotSpot
AVKey.NORTH indicates that the
 HotSpot resizes the frame vertically from the north edge (the user clicks the top edge of the frame and drags
 vertically).
 
 An instance of this class should be added to the picked object when the edge or corner of the frame is picked.
 
 Subclasses must the implement {#getSize}, {#setSize}, {#getScreenPoint}, and {#setScreenPoint} to manipulate the
 frame that they want to resize.| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | adjustLocationXTrue if the window needs to be moved in the X direction as it is resized. | 
| protected boolean | adjustLocationYTrue if the window needs to be moved in the Y direction as it is resized. | 
| protected boolean | allowHorizontalResize | 
| protected boolean | allowVerticalResize | 
| protected int | cursor | 
| protected boolean | dragging | 
| protected Point | dragRefPoint | 
| protected static int | EAST | 
| protected static int | NORTH | 
| protected static int | NORTHEAST | 
| protected static int | NORTHWEST | 
| protected Point | refLocation | 
| protected Dimension | refSize | 
| protected static int | SOUTH | 
| protected static int | SOUTHEAST | 
| protected static int | SOUTHWEST | 
| protected static int | WEST | 
| protected int | xSign | 
| protected int | ySign | 
active| Constructor and Description | 
|---|
| AbstractResizeHotSpot() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | beginDrag(Point point) | 
| void | drag(Point point) | 
| protected void | endDrag()Called when a drag action ends. | 
| Cursor | getCursor()Get a cursor for the type of resize that this hotspot handles. | 
| protected Dimension | getMinimumSize()Get the minimum size of the frame. | 
| protected abstract Point | getScreenPoint()Get the screen point of the upper left corner of the frame. | 
| protected abstract Dimension | getSize()Get the size of the frame. | 
| boolean | isDragging()Is the control currently dragging? | 
| protected boolean | isValidSize(int width,
           int height)Is a frame size valid? This method is called before attempting to resize the frame. | 
| void | mouseMoved(MouseEvent e)Update the resize cursor when the mouse moves. | 
| void | selected(SelectEvent event)Handle a  SelectEventand callbeginDrag(java.awt.Point),drag(java.awt.Point),endDrag()as appropriate. | 
| void | setActive(boolean active)Called when this HotSpot is activated or deactivated. | 
| protected void | setDirection(int direction) | 
| protected void | setDirection(String direction) | 
| protected void | setDirectionFromPoint(Point pickPoint)Set the resize direction based on which point on the frame was picked (if a point on the left of the frame is
 picked, the resize direction is west, if a point on the top edge is picked the resize direction is north, etc). | 
| protected abstract void | setScreenPoint(Point newPoint)Set the screen point of the upper left corner of the frame. | 
| protected abstract void | setSize(Dimension newSize)Set the size of the frame. | 
isActive, isConsumed, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMovedaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected boolean adjustLocationX
protected boolean adjustLocationY
protected boolean allowHorizontalResize
protected boolean allowVerticalResize
protected int cursor
protected boolean dragging
protected Point dragRefPoint
protected static final int EAST
protected static final int NORTH
protected static final int NORTHEAST
protected static final int NORTHWEST
protected Point refLocation
protected Dimension refSize
protected static final int SOUTH
protected static final int SOUTHEAST
protected static final int SOUTHWEST
protected static final int WEST
protected int xSign
protected int ySign
protected void beginDrag(Point point)
public void drag(Point point)
protected void endDrag()
dragRefPoint to null.public Cursor getCursor()
getCursor in interface HotSpotgetCursor in class AbstractHotSpotprotected Dimension getMinimumSize()
isValidSize(int, int)protected abstract Point getScreenPoint()
protected abstract Dimension getSize()
public boolean isDragging()
protected boolean isValidSize(int width,
                              int height)
width - Frame width.height - Frame height.getMinimumSize()public void mouseMoved(MouseEvent e)
mouseMoved in interface HotSpotmouseMoved in interface MouseMotionListenermouseMoved in class AbstractHotSpote - Mouse event.public void selected(SelectEvent event)
SelectEvent and call beginDrag(java.awt.Point), drag(java.awt.Point), endDrag() as appropriate. Subclasses may override this method if they need to handle events other than drag
 events.selected in interface SelectListenerselected in interface HotSpotselected in class AbstractHotSpotevent - Select event.public void setActive(boolean active)
setActive in interface HotSpotsetActive in class AbstractHotSpotactive - true if the HotSpot is being activated, false if it is being deactivated.protected void setDirection(int direction)
protected void setDirection(String direction)
protected void setDirectionFromPoint(Point pickPoint)
pickPoint - The point on the frame that was picked.protected abstract void setScreenPoint(Point newPoint)
newPoint - New screen point measured from upper left corner of the screen (AWT coordinates).protected abstract void setSize(Dimension newSize)
newSize - New frame size in pixels.