public class FrameResizeControl extends AbstractResizeHotSpot
Modifier and Type | Field and Description |
---|---|
protected ScrollFrame |
frame |
adjustLocationX, adjustLocationY, allowHorizontalResize, allowVerticalResize, cursor, dragging, dragRefPoint, EAST, NORTH, NORTHEAST, NORTHWEST, refLocation, refSize, SOUTH, SOUTHEAST, SOUTHWEST, WEST, xSign, ySign
active
Constructor and Description |
---|
FrameResizeControl(ScrollFrame frame)
Create a resize control.
|
Modifier and Type | Method and Description |
---|---|
protected void |
beginDrag(Point point) |
protected void |
endDrag()
Called when a drag action ends.
|
protected Dimension |
getMinimumSize()
Get the minimum size of the frame.
|
protected Point |
getScreenPoint()
Get the screen point of the upper left corner of the frame.
|
protected Dimension |
getSize()
Get the size of the frame.
|
void |
mouseWheelMoved(MouseWheelEvent event)
Forwards mouse wheel events to the frame, so that the contents can be scrolled when the mouse is over the resize
area.
|
protected void |
setScreenPoint(Point newPoint)
Set the screen point of the upper left corner of the frame.
|
protected void |
setSize(Dimension newSize)
Set the size of the frame.
|
drag, getCursor, isDragging, isValidSize, mouseMoved, selected, setActive, setDirection, setDirection, setDirectionFromPoint
isActive, isConsumed, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased
addPropertyChangeListener, 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, setValues
protected ScrollFrame frame
public FrameResizeControl(ScrollFrame frame)
frame
- Frame to resize.protected void beginDrag(Point point)
beginDrag
in class AbstractResizeHotSpot
protected void endDrag()
AbstractResizeHotSpot.dragRefPoint
to null.endDrag
in class AbstractResizeHotSpot
protected Dimension getMinimumSize()
getMinimumSize
in class AbstractResizeHotSpot
AbstractResizeHotSpot.isValidSize(int, int)
protected Point getScreenPoint()
getScreenPoint
in class AbstractResizeHotSpot
protected Dimension getSize()
getSize
in class AbstractResizeHotSpot
public void mouseWheelMoved(MouseWheelEvent event)
mouseWheelMoved
in interface HotSpot
mouseWheelMoved
in interface MouseWheelListener
mouseWheelMoved
in class AbstractHotSpot
event
- The event to handle.protected void setScreenPoint(Point newPoint)
setScreenPoint
in class AbstractResizeHotSpot
newPoint
- New screen point measured from upper left corner of the screen (AWT coordinates).protected void setSize(Dimension newSize)
setSize
in class AbstractResizeHotSpot
newSize
- New frame size in pixels.