Package com.anylogic.engine.presentation
- Nested Class Summary
- Nested classes/interfaces inherited from class com.anylogic.engine.presentation.ShapeControl
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.presentation.ShapeInputControl
- Methods inherited from class com.anylogic.engine.presentation.ShapeControl
- Methods inherited from class com.anylogic.engine.presentation.Shape
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.ShapeControl
- com.anylogic.engine.presentation.ShapeInputControl
- com.anylogic.engine.presentation.ShapeButton
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Locatable2D
,AggregatableAnimationElement
,HasLevel
,LevelElement
,SVGElement
,UsdElement
,Serializable
,Cloneable
public class ShapeButton extends ShapeInputControl
Button control. Embeds a JButton component.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
ShapeButton |
Creates a persistent button control.
|
ShapeButton |
Deprecated.
may be removed in future releases
|
ShapeButton |
Deprecated.
may be removed in future releases
|
action, clone, contains, executeAction, getHeight, getPresentable, getWidth, isEnabled, randomPointInside, restoreOwner, setEnabled, setHeight, setValueToDefault, setWidth
canHandleClick, findSVGElement, getDrawMode, getGroup, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, isVisibleCurrently, onAggregatorVisibilityChanged, onClick, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, setChangedUsdVersion, setLevel, setNextChangedUsdVersion, setPos, setPos, setPublic_xjal, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
@Deprecated public ShapeButton(Presentable p, boolean ispublic, double x, double y, double width, double height, Color backgroundColor, Color textColor, Font font, String text)
Deprecated.
may be removed in future releases
@Deprecated public ShapeButton(Presentable p, boolean ispublic, double x, double y, double width, double height, Color backgroundColor, Color textColor, boolean enabled, Font font, String text)
Deprecated.
may be removed in future releases
public ShapeButton(Presentable p, boolean ispublic, double x, double y, double width, double height, Color textColor, boolean enabled, Font font, String text)
Creates a persistent button control. You should override the action()
method.
- Parameters:
p
- the presentable object owning this controlispublic
- iftrue
, the control is visible on container's presentationx
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heighttextColor
- the text colorenabled
- the initial enabled statefont
- the text fonttext
- the text label of the button
public void setText(Object text)
Sets the button label text
- Parameters:
text
- the new label text
public String getText()
Returns the button label text.
- Returns:
- the button label text
@AnyLogicInternalAPI public void executeUserAction(String value)
Description copied from interface:
SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
executeUserAction
in interfaceSVGElement
- Overrides:
executeUserAction
in classShape