Package eu.svjatoslav.sixth.e3d.gui
Class GuiComponent
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
eu.svjatoslav.sixth.e3d.gui.GuiComponent
- All Implemented Interfaces:
KeyboardInputHandler,MouseInteractionController
- Direct Known Subclasses:
TextEditComponent
public class GuiComponent
extends AbstractCompositeShape
implements KeyboardInputHandler, MouseInteractionController
-
Field Summary
FieldsFields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanfocusReceived(ViewPanel viewPanel) intgetDepth()intintgetWidth()voidbooleankeyPressed(KeyEvent event, ViewPanel viewPanel) booleankeyReleased(KeyEvent event, ViewPanel viewPanel) booleanmouseClicked(int button) Called when mouse is clicked on component.booleanCalled when mouse gets over given component.booleanCalled when mouse leaves screen area occupied by component.Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
addShape, addShape, beforeTransformHook, getGroup, getLocation, getOriginalSubShapes, getRelativityTracker, hideGroup, removeGroup, setColor, setGroupForUngrouped, setMouseInteractionController, setTransform, showGroup, transform
-
Field Details
-
viewPanel
-
-
Constructor Details
-
GuiComponent
-
-
Method Details
-
focusLost
- Specified by:
focusLostin interfaceKeyboardInputHandler- Returns:
trueif view needs to be re-rendered.
-
focusReceived
- Specified by:
focusReceivedin interfaceKeyboardInputHandler- Returns:
trueif view needs to be re-rendered.
-
getBorders
-
getDepth
public int getDepth() -
getHeight
public int getHeight() -
getWidth
public int getWidth() -
hideBorder
public void hideBorder() -
keyPressed
- Specified by:
keyPressedin interfaceKeyboardInputHandler- Returns:
trueif view needs to be re-rendered.
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyboardInputHandler- Returns:
trueif view needs to be re-rendered.
-
mouseClicked
public boolean mouseClicked(int button) Description copied from interface:MouseInteractionControllerCalled when mouse is clicked on component.- Specified by:
mouseClickedin interfaceMouseInteractionController- Returns:
trueif view update is needed as a consequence of this mouse click.
-
mouseEntered
public boolean mouseEntered()Description copied from interface:MouseInteractionControllerCalled when mouse gets over given component.- Specified by:
mouseEnteredin interfaceMouseInteractionController- Returns:
trueif view update is needed as a consequence of this mouse enter.
-
mouseExited
public boolean mouseExited()Description copied from interface:MouseInteractionControllerCalled when mouse leaves screen area occupied by component.- Specified by:
mouseExitedin interfaceMouseInteractionController- Returns:
trueif view update is needed as a consequence of this mouse exit.
-