Package io.guise.framework.component
Class AbstractComponent.AbstractFlyoverStrategy<S extends Component>
java.lang.Object
io.guise.framework.event.MouseAdapter
io.guise.framework.component.AbstractComponent.AbstractFlyoverStrategy<S>
- Type Parameters:
S
- The type of component for which this object is to control flyovers.
- All Implemented Interfaces:
Component.FlyoverStrategy<S>
,GuiseEventListener
,MouseListener
,EventListener
- Direct Known Subclasses:
AbstractComponent.AbstractFlyoverFrameStrategy
- Enclosing class:
- AbstractComponent
public abstract static class AbstractComponent.AbstractFlyoverStrategy<S extends Component>
extends MouseAdapter
implements Component.FlyoverStrategy<S>
An abstract implementation of a strategy for showing and hiding flyovers in response to mouse events.
- Author:
- Garret Wilson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the extent of the indicated flow.void
mouseEntered
(MouseEnterEvent mouseEvent) Called when the mouse enters the target.void
mouseExited
(MouseExitEvent mouseEvent) Called when the mouse exits the target.void
Sets the extent of a given flow.void
setLineExtent
(Extent newExtent) Sets the requested line extent (width in left-to-right top-to-bottom orientation) of the flyover component.void
setOpenEffect
(Effect newOpenEffect) Sets the effect used for opening the flyover.void
setPageExtent
(Extent newExtent) Sets the requested page extent (height in left-to-right top-to-bottom orientation) of the flyover component.void
setStyleID
(String newStyleID) Identifies the style for the flyover component.void
setTetherBearing
(BigDecimal newTetherBearing) Sets the bearing of the tether in relation to the frame.Methods inherited from class io.guise.framework.event.MouseAdapter
mouseClicked
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.guise.framework.component.Component.FlyoverStrategy
closeFlyover, openFlyover
Methods inherited from interface io.guise.framework.event.MouseListener
mouseClicked
-
Constructor Details
-
AbstractFlyoverStrategy
Component constructor.- Parameters:
component
- The component for which this object will control flyovers.- Throws:
NullPointerException
- if the given component isnull
.
-
-
Method Details
-
getComponent
- Returns:
- The component for which this object will control flyovers.
-
getExtent
Returns the extent of the indicated flow.- Parameters:
flow
- The flow for which an extent should be returned.- Returns:
- The extent of the given flow.
-
getLineExtent
- Specified by:
getLineExtent
in interfaceComponent.FlyoverStrategy<S extends Component>
- Returns:
- The requested line extent (width in left-to-right top-to-bottom orientation) of the flyover component, or
null
if no preferred line extent has been specified.
-
getPageExtent
- Specified by:
getPageExtent
in interfaceComponent.FlyoverStrategy<S extends Component>
- Returns:
- The requested page extent (height in left-to-right top-to-bottom orientation) of the flyover component, or
null
if no preferred page extent has been specified.
-
setExtent
Sets the extent of a given flow. The extent of each flow represents a bound property.- Parameters:
flow
- The flow for which the extent should be set.newExtent
- The new requested extent of the flyover, ornull
there is no extent preference.- Throws:
NullPointerException
- if the given flow isnull
.
-
setLineExtent
Description copied from interface:Component.FlyoverStrategy
Sets the requested line extent (width in left-to-right top-to-bottom orientation) of the flyover component.- Specified by:
setLineExtent
in interfaceComponent.FlyoverStrategy<S extends Component>
- Parameters:
newExtent
- The new requested line extent of the flyover component, ornull
there is no line extent preference.
-
setPageExtent
Description copied from interface:Component.FlyoverStrategy
Sets the requested page extent (height in left-to-right top-to-bottom orientation) of the flyover component.- Specified by:
setPageExtent
in interfaceComponent.FlyoverStrategy<S extends Component>
- Parameters:
newExtent
- The new requested page extent of the flyover component, ornull
there is no page extent preference.
-
getStyleID
- Specified by:
getStyleID
in interfaceComponent.FlyoverStrategy<S extends Component>
- Returns:
- The style identifier of the flyover, or
null
if there is no style ID.
-
setStyleID
Description copied from interface:Component.FlyoverStrategy
Identifies the style for the flyover component.- Specified by:
setStyleID
in interfaceComponent.FlyoverStrategy<S extends Component>
- Parameters:
newStyleID
- The style identifier of the flyover, ornull
if there is no style ID.
-
getTetherBearing
- Returns:
- The bearing of the tether in relation to the frame.
-
setTetherBearing
Sets the bearing of the tether in relation to the frame.- Parameters:
newTetherBearing
- The new bearing of the tether in relation to the frame.- Throws:
NullPointerException
- if the given bearing isnull
.IllegalArgumentException
- if the given bearing is greater than 360.
-
getOpenEffect
- Specified by:
getOpenEffect
in interfaceComponent.FlyoverStrategy<S extends Component>
- Returns:
- The effect used for opening the flyover, or
null
if there is no open effect.
-
setOpenEffect
Description copied from interface:Component.FlyoverStrategy
Sets the effect used for opening the flyover.- Specified by:
setOpenEffect
in interfaceComponent.FlyoverStrategy<S extends Component>
- Parameters:
newOpenEffect
- The new effect used for opening the flyover, ornull
if there should be no open effect.- See Also:
-
mouseEntered
Called when the mouse enters the target.This implementation opens the flyover.
- Specified by:
mouseEntered
in interfaceMouseListener
- Overrides:
mouseEntered
in classMouseAdapter
- Parameters:
mouseEvent
- The event providing mouse information- See Also:
-
mouseExited
Called when the mouse exits the target.This implementation closes any open flyover.
- Specified by:
mouseExited
in interfaceMouseListener
- Overrides:
mouseExited
in classMouseAdapter
- Parameters:
mouseEvent
- The event providing mouse information- See Also:
-