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
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
focusReceived
(ViewPanel viewPanel) int
getDepth()
int
int
getWidth()
void
boolean
keyPressed
(KeyEvent event, ViewPanel viewPanel) boolean
keyReleased
(KeyEvent event, ViewPanel viewPanel) boolean
mouseClicked
(int button) Called when mouse is clicked on component.boolean
Called when mouse gets over given component.boolean
Called 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:
focusLost
in interfaceKeyboardInputHandler
- Returns:
true
if view needs to be re-rendered.
-
focusReceived
- Specified by:
focusReceived
in interfaceKeyboardInputHandler
- Returns:
true
if 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:
keyPressed
in interfaceKeyboardInputHandler
- Returns:
true
if view needs to be re-rendered.
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyboardInputHandler
- Returns:
true
if view needs to be re-rendered.
-
mouseClicked
public boolean mouseClicked(int button) Description copied from interface:MouseInteractionController
Called when mouse is clicked on component.- Specified by:
mouseClicked
in interfaceMouseInteractionController
- Returns:
true
if view update is needed as a consequence of this mouse click.
-
mouseEntered
public boolean mouseEntered()Description copied from interface:MouseInteractionController
Called when mouse gets over given component.- Specified by:
mouseEntered
in interfaceMouseInteractionController
- Returns:
true
if view update is needed as a consequence of this mouse enter.
-
mouseExited
public boolean mouseExited()Description copied from interface:MouseInteractionController
Called when mouse leaves screen area occupied by component.- Specified by:
mouseExited
in interfaceMouseInteractionController
- Returns:
true
if view update is needed as a consequence of this mouse exit.
-