hsgame
接口 Control

所有已知子接口:
Button, Form, Label, ListItem, ListView, ProgressBar

public interface Control

基础控件。

作者:
HsGame

方法摘要
 void addActivated(java.lang.String activatedMethod)
           
 void addAlpha(int startAlpha, int endAlpha, int time, boolean containsChildren, java.lang.String alphaOveredMethod)
           
 void addBackColorChanged(java.lang.String backColorChangedMethod)
           
 void addControl(Control control)
          添加子控件。
 void addControlAdded(java.lang.String controlAddedMethod)
           
 void addControlRemoved(java.lang.String controlRemovedMethod)
           
 void addDisabledMouseDown(java.lang.String mouseDownMethod)
           
 void addDisabledMouseMove(java.lang.String mouseMoveMethod)
           
 void addDisabledMouseUp(java.lang.String mouseUpMethod)
           
 void addDisabledMouseUpDown(java.lang.String mouseUpDownMethod)
           
 void addDisabledMouseUpDownMove(java.lang.String mouseUpDownMoveMethod)
           
 void addEnabledChanged(java.lang.String enableChangedMethod)
           
 void addFilledRectangle(int x, int y, int width, int height, long color)
           
 void addFrameFlagChecked(Action action, short frameFlag, java.lang.String frameFlagCheckedEventHandlerMethod)
          添加帧标记监测事件。
 void addFrameFlagChecked(short frameFlag, java.lang.String frameFlagCheckedEventHandlerMethod)
          添加帧标记监测事件。
 void addGotFocus(java.lang.String gotFocusMethod)
           
 void addInvalidated(java.lang.String invalidatedMethod)
           
 void addKeyDown(java.lang.String keyDownMethod)
           
 void addKeyUp(java.lang.String keyUpMethod)
           
 void addLeft(int dis)
           
 void addLine(int x1, int y1, int x2, int y2, int width, long color)
           
 void addLinearMove(int targetX, int targetY, int moveTime, java.lang.String linearMoveOverMethod)
           
 void addLoad(java.lang.String loadMethod)
           
 void addLocationChanged(java.lang.String locationChangedMethod)
           
 void addLoseFocus(java.lang.String loseFocusMethod)
           
 void addMouseDown(java.lang.Object caller, java.lang.String mouseDownMethod)
           
 void addMouseDown(java.lang.String mouseDownMethod)
           
 void addMouseMove(java.lang.Object caller, java.lang.String mouseMoveMethod)
           
 void addMouseMove(java.lang.String mouseMoveMethod)
           
 void addMouseUp(java.lang.Object caller, java.lang.String mouseUpMethod)
           
 void addMouseUp(java.lang.String mouseUpMethod)
           
 void addMouseUpDown(java.lang.String mouseUpDownMethod)
           
 void addMouseUpDownMove(java.lang.String mouseUpDownMoveMethod)
           
 void addMove(java.lang.String moveMethod)
           
 void addPaint(java.lang.Object caller, java.lang.String paintMethod)
           
 void addPaint(java.lang.String paintMethod)
           
 void addParentChanged(java.lang.String addParentMethod)
           
 void addParticleEffect(java.lang.String particleEffectName, int x, int y, boolean needRestart, java.lang.String completionOverMethod)
           
 void addPathMove(int pathGroupId, int pathId, java.lang.String pathMoveOverMethod)
           
 void addRectangle(int x, int y, int width, int height, long color)
           
 void addResize(java.lang.String resizeMethod)
           
 void addScale(int startScaleX, int startScaleY, int endScaleX, int endScaleY, int time, java.lang.String scaleOveredMethod)
           
 void addSizeChanged(java.lang.String sizeChangedMethod)
           
 void addTimer(int time, java.lang.String timeOveredMethod)
           
 void addTop(int dis)
           
 void addUIAction(Action action, int x, int y)
          动画添加到控件上。
 void addUIAction(Action action, int x, int y, boolean clip)
           
 void addUIAction(Action action, int x, int y, int scaleX, int scaleY)
           
 void addUIAction(Action action, int x, int y, int scaleX, int scaleY, boolean clip)
           
 void addUIPainter(ActorUIPainter uiPainter, int x, int y, boolean isInitialAnimation)
           
 void addUIPainter(ActorUIPainter uiPainter, int x, int y, int scaleX, int scaleY, boolean isInitialAnimation)
           
 void addUIPainter(UIPainter uiPainter, int x, int y)
           
 void addUIPainter(UIPainter uiPainter, int x, int y, int scaleX, int scaleY)
           
 void addVisibleChanged(java.lang.String visibleChangedMethod)
           
 void clearShape()
           
 void clearShapes()
           
 void clearUIAction()
           
 void clearUIActions()
           
 void clearUIPainter()
           
 void clearUIPainters()
           
 java.lang.Object clone()
           
 boolean contains(Control control)
          是否包含控件。
 IWebViewClient createWebViewClient()
           
 int getBackColor()
           
 int getBorderColor()
           
 java.awt.Rectangle getClientRectangle()
           
 Control getControl(int id)
           
 java.awt.Rectangle getControlRectangleToScreen()
           
 java.util.List<Control> getControls()
           
 byte getFontSize()
           
 int getForeBorderColor()
           
 int getForeColor()
           
 int getHeight()
           
 int getLeft()
           
 int getLeftToForm()
           
 int getLeftToScreen()
           
 Control getParent()
           
 Control getParentForm()
           
 java.lang.Object getTag()
           
 java.lang.String getText()
           
 short getTextAlign()
           
 int getTop()
           
 int getTopToForm()
           
 int getTopToScreen()
           
 int getWidth()
           
 void insertControl(int index, Control control)
          插入子控件。
 boolean isChecked()
           
 boolean isContainer()
           
 boolean isCreated()
           
 boolean isEnabled()
           
 boolean isFlipX()
           
 boolean isPaint()
           
 boolean isVisible()
           
 void removeActivated(java.lang.String activatedMethod)
           
 void removeAllControls()
          移除全部控件。
 void removeBackColorChanged(java.lang.String backColorChangedMethod)
           
 void removeBasePaintEvent()
          移除基础绘制事件。
 void removeControl(Control control)
          移除控件。
 void removeControl(int index)
          移除控件。
 void removeControlAdded(java.lang.String controlAddedMethod)
           
 void removeControlRemoved(java.lang.String controlRemovedMethod)
           
 void removeDisabledMouseDown(java.lang.String mouseDownMethod)
           
 void removeDisabledMouseMove(java.lang.String mouseMoveMethod)
           
 void removeDisabledMouseUp(java.lang.String mouseUpMethod)
           
 void removeEnabledChanged(java.lang.String enableChangedMethod)
           
 void removeFilledRectangle(int x, int y, int width, int height, long color)
           
 void removeFrameFlagChecked(java.lang.String frameFlagCheckedEventHandlerMethod)
          移除帧标记监测事件。
 void removeGotFocus(java.lang.String gotFocusMethod)
           
 void removeInvalidated(java.lang.String invalidatedMethod)
           
 void removeKeyDown(java.lang.String keyDownMethod)
           
 void removeKeyUp(java.lang.String keyUpMethod)
           
 void removeLine(int x1, int y1, int x2, int y2, int width, long color)
           
 void removeLinearMove()
           
 void removeLoad(java.lang.String loadMethod)
           
 void removeLocationChanged(java.lang.String locationChangedMethod)
           
 void removeLoseFocus(java.lang.String loseFocusMethod)
           
 void removeMouseDown(java.lang.String mouseDownMethod)
           
 void removeMouseMove(java.lang.String mouseMoveMethod)
           
 void removeMouseUp(java.lang.String mouseUpMethod)
           
 void removeMove(java.lang.String moveMethod)
           
 void removePaint(java.lang.String paintMethod)
           
 void removeParentChanged(java.lang.String addParentMethod)
           
 void removeParticleEffect(java.lang.String particleEffectName)
           
 void removePathMove()
           
 void removeRectangle(int x, int y, int width, int height, long color)
           
 void removeResize(java.lang.String resizeMethod)
           
 void removeSizeChanged(java.lang.String sizeChangedMethod)
           
 void removeTimer(java.lang.String timeOveredMethod)
           
 void removeUIAction(Action action)
           
 void removeUIPainter(UIPainter uiPainter)
           
 void removeVisibleChanged(java.lang.String visibleChangedMethod)
           
 void resetAsc()
           
 void setAlpha(int alpha, boolean containsChildren)
           
 void setAnchor(int anchor)
           
 void setBackColor(long backColor)
           
 void setBorderColor(long borderColor)
           
 void setChecked(boolean checked)
           
 void setDigitalText(int number, short digitalAnimationId)
           
 void setEnabled(boolean enabled)
           
 void setFlipX(boolean flipX)
           
 void setFontSize(byte fontSize)
           
 void setForeBorderColor(long foreBorderColor)
           
 void setForeColor(long foreColor)
           
 void setHeight(int height)
           
 void setLeft(int left)
           
 void setPaint(boolean paint)
           
 void setParent(Control parent)
           
 void setScale(int scalePrecentX, int scalePrecentY)
           
 void setShader(int shader)
          设置shader效果。
 void setTag(java.lang.Object tag)
           
 void setText(java.lang.String text)
           
 void setText(java.lang.String text, short textAnimationId)
           
 void setTextAlign(short textAlign)
          1.TopLeft 2.TopCenter 4.TopRight 16.MiddleLeft 32.MiddleCenter 64.MiddleRight 256.BottomLeft 512.BottomCenter 1024.BottomRight 2048.Fill_TopLeft 4096.Fill_Center 8192.Fill_TopRight
 void setTheme(byte state, Action action)
          设置皮肤(0~6)
 void setTop(int top)
           
 void setUIActionLoopCount(Action action, int loopCount)
           
 void setUIPainterAction(UIPainter uiPainter, short actionId)
           
 void setUIPainterLoopCount(UIPainter uiPainter, int loopCount)
           
 void setVisible(boolean visible)
           
 void setWidth(int width)
           
 

方法详细信息

removeBasePaintEvent

void removeBasePaintEvent()
移除基础绘制事件。


setScale

void setScale(int scalePrecentX,
              int scalePrecentY)

setShader

void setShader(int shader)
设置shader效果。 -1:正常;0:灰度

参数:
shader -

setTheme

void setTheme(byte state,
              Action action)
设置皮肤(0~6)

参数:
state -
action -

addControl

void addControl(Control control)
添加子控件。 若自身是非容器控件,则子控件添加到父控件上。

参数:
control -

insertControl

void insertControl(int index,
                   Control control)
插入子控件。

参数:
index -
control -

removeControl

void removeControl(Control control)
移除控件。

参数:
control -

removeControl

void removeControl(int index)
移除控件。

参数:
index -

removeAllControls

void removeAllControls()
移除全部控件。


contains

boolean contains(Control control)
是否包含控件。

参数:
control -
返回:

getLeft

int getLeft()

setLeft

void setLeft(int left)

addLeft

void addLeft(int dis)

getTop

int getTop()

setTop

void setTop(int top)

addTop

void addTop(int dis)

getWidth

int getWidth()

setWidth

void setWidth(int width)

getHeight

int getHeight()

setHeight

void setHeight(int height)

getParent

Control getParent()

setParent

void setParent(Control parent)

getParentForm

Control getParentForm()

getControls

java.util.List<Control> getControls()

getControl

Control getControl(int id)

isVisible

boolean isVisible()

setVisible

void setVisible(boolean visible)

isPaint

boolean isPaint()

setPaint

void setPaint(boolean paint)

isEnabled

boolean isEnabled()

setEnabled

void setEnabled(boolean enabled)

isCreated

boolean isCreated()

getTextAlign

short getTextAlign()

setTextAlign

void setTextAlign(short textAlign)
1.TopLeft 2.TopCenter 4.TopRight 16.MiddleLeft 32.MiddleCenter 64.MiddleRight 256.BottomLeft 512.BottomCenter 1024.BottomRight 2048.Fill_TopLeft 4096.Fill_Center 8192.Fill_TopRight

参数:
textAlign -

getBackColor

int getBackColor()

setBackColor

void setBackColor(long backColor)

getForeColor

int getForeColor()

setForeColor

void setForeColor(long foreColor)

getForeBorderColor

int getForeBorderColor()

setForeBorderColor

void setForeBorderColor(long foreBorderColor)

getFontSize

byte getFontSize()

setFontSize

void setFontSize(byte fontSize)

getBorderColor

int getBorderColor()

setBorderColor

void setBorderColor(long borderColor)

getText

java.lang.String getText()

setText

void setText(java.lang.String text)

setText

void setText(java.lang.String text,
             short textAnimationId)

setDigitalText

void setDigitalText(int number,
                    short digitalAnimationId)

setAnchor

void setAnchor(int anchor)

isContainer

boolean isContainer()

isChecked

boolean isChecked()

setChecked

void setChecked(boolean checked)

setFlipX

void setFlipX(boolean flipX)

isFlipX

boolean isFlipX()

getClientRectangle

java.awt.Rectangle getClientRectangle()

getControlRectangleToScreen

java.awt.Rectangle getControlRectangleToScreen()

getLeftToForm

int getLeftToForm()

getLeftToScreen

int getLeftToScreen()

getTopToForm

int getTopToForm()

getTopToScreen

int getTopToScreen()

clone

java.lang.Object clone()

addUIAction

void addUIAction(Action action,
                 int x,
                 int y)
动画添加到控件上。

参数:
action -
x -
y -

addUIAction

void addUIAction(Action action,
                 int x,
                 int y,
                 int scaleX,
                 int scaleY)

addUIAction

void addUIAction(Action action,
                 int x,
                 int y,
                 boolean clip)

addUIAction

void addUIAction(Action action,
                 int x,
                 int y,
                 int scaleX,
                 int scaleY,
                 boolean clip)

setUIActionLoopCount

void setUIActionLoopCount(Action action,
                          int loopCount)

removeUIAction

void removeUIAction(Action action)

clearUIAction

void clearUIAction()

clearUIActions

void clearUIActions()

setUIPainterAction

void setUIPainterAction(UIPainter uiPainter,
                        short actionId)

setUIPainterLoopCount

void setUIPainterLoopCount(UIPainter uiPainter,
                           int loopCount)

addUIPainter

void addUIPainter(ActorUIPainter uiPainter,
                  int x,
                  int y,
                  boolean isInitialAnimation)

addUIPainter

void addUIPainter(ActorUIPainter uiPainter,
                  int x,
                  int y,
                  int scaleX,
                  int scaleY,
                  boolean isInitialAnimation)

addUIPainter

void addUIPainter(UIPainter uiPainter,
                  int x,
                  int y)

addUIPainter

void addUIPainter(UIPainter uiPainter,
                  int x,
                  int y,
                  int scaleX,
                  int scaleY)

removeUIPainter

void removeUIPainter(UIPainter uiPainter)

clearUIPainter

void clearUIPainter()

clearUIPainters

void clearUIPainters()

setAlpha

void setAlpha(int alpha,
              boolean containsChildren)

getTag

java.lang.Object getTag()

setTag

void setTag(java.lang.Object tag)

addLine

void addLine(int x1,
             int y1,
             int x2,
             int y2,
             int width,
             long color)

removeLine

void removeLine(int x1,
                int y1,
                int x2,
                int y2,
                int width,
                long color)

addRectangle

void addRectangle(int x,
                  int y,
                  int width,
                  int height,
                  long color)

removeRectangle

void removeRectangle(int x,
                     int y,
                     int width,
                     int height,
                     long color)

addFilledRectangle

void addFilledRectangle(int x,
                        int y,
                        int width,
                        int height,
                        long color)

removeFilledRectangle

void removeFilledRectangle(int x,
                           int y,
                           int width,
                           int height,
                           long color)

clearShape

void clearShape()

clearShapes

void clearShapes()

createWebViewClient

IWebViewClient createWebViewClient()

resetAsc

void resetAsc()

addParticleEffect

void addParticleEffect(java.lang.String particleEffectName,
                       int x,
                       int y,
                       boolean needRestart,
                       java.lang.String completionOverMethod)

removeParticleEffect

void removeParticleEffect(java.lang.String particleEffectName)

addPathMove

void addPathMove(int pathGroupId,
                 int pathId,
                 java.lang.String pathMoveOverMethod)

removePathMove

void removePathMove()

addLinearMove

void addLinearMove(int targetX,
                   int targetY,
                   int moveTime,
                   java.lang.String linearMoveOverMethod)

removeLinearMove

void removeLinearMove()

addTimer

void addTimer(int time,
              java.lang.String timeOveredMethod)

removeTimer

void removeTimer(java.lang.String timeOveredMethod)

addScale

void addScale(int startScaleX,
              int startScaleY,
              int endScaleX,
              int endScaleY,
              int time,
              java.lang.String scaleOveredMethod)

addAlpha

void addAlpha(int startAlpha,
              int endAlpha,
              int time,
              boolean containsChildren,
              java.lang.String alphaOveredMethod)

addActivated

void addActivated(java.lang.String activatedMethod)

removeActivated

void removeActivated(java.lang.String activatedMethod)

addFrameFlagChecked

void addFrameFlagChecked(short frameFlag,
                         java.lang.String frameFlagCheckedEventHandlerMethod)
添加帧标记监测事件。

参数:
frameFlag -
frameFlagCheckedEventHandlerMethod -

addFrameFlagChecked

void addFrameFlagChecked(Action action,
                         short frameFlag,
                         java.lang.String frameFlagCheckedEventHandlerMethod)
添加帧标记监测事件。

参数:
action -
frameFlag -
frameFlagCheckedEventHandlerMethod -

removeFrameFlagChecked

void removeFrameFlagChecked(java.lang.String frameFlagCheckedEventHandlerMethod)
移除帧标记监测事件。

参数:
frameFlagCheckedEventHandlerMethod -

addPaint

void addPaint(java.lang.String paintMethod)

addPaint

void addPaint(java.lang.Object caller,
              java.lang.String paintMethod)

removePaint

void removePaint(java.lang.String paintMethod)

addInvalidated

void addInvalidated(java.lang.String invalidatedMethod)

removeInvalidated

void removeInvalidated(java.lang.String invalidatedMethod)

addParentChanged

void addParentChanged(java.lang.String addParentMethod)

removeParentChanged

void removeParentChanged(java.lang.String addParentMethod)

addGotFocus

void addGotFocus(java.lang.String gotFocusMethod)

removeGotFocus

void removeGotFocus(java.lang.String gotFocusMethod)

addLoseFocus

void addLoseFocus(java.lang.String loseFocusMethod)

removeLoseFocus

void removeLoseFocus(java.lang.String loseFocusMethod)

addLoad

void addLoad(java.lang.String loadMethod)

removeLoad

void removeLoad(java.lang.String loadMethod)

addMove

void addMove(java.lang.String moveMethod)

removeMove

void removeMove(java.lang.String moveMethod)

addLocationChanged

void addLocationChanged(java.lang.String locationChangedMethod)

removeLocationChanged

void removeLocationChanged(java.lang.String locationChangedMethod)

addSizeChanged

void addSizeChanged(java.lang.String sizeChangedMethod)

removeSizeChanged

void removeSizeChanged(java.lang.String sizeChangedMethod)

addResize

void addResize(java.lang.String resizeMethod)

removeResize

void removeResize(java.lang.String resizeMethod)

addBackColorChanged

void addBackColorChanged(java.lang.String backColorChangedMethod)

removeBackColorChanged

void removeBackColorChanged(java.lang.String backColorChangedMethod)

addKeyUp

void addKeyUp(java.lang.String keyUpMethod)

removeKeyUp

void removeKeyUp(java.lang.String keyUpMethod)

addKeyDown

void addKeyDown(java.lang.String keyDownMethod)

removeKeyDown

void removeKeyDown(java.lang.String keyDownMethod)

addMouseUpDown

void addMouseUpDown(java.lang.String mouseUpDownMethod)

addMouseUpDownMove

void addMouseUpDownMove(java.lang.String mouseUpDownMoveMethod)

addMouseUp

void addMouseUp(java.lang.String mouseUpMethod)

addMouseUp

void addMouseUp(java.lang.Object caller,
                java.lang.String mouseUpMethod)

removeMouseUp

void removeMouseUp(java.lang.String mouseUpMethod)

addMouseDown

void addMouseDown(java.lang.String mouseDownMethod)

addMouseDown

void addMouseDown(java.lang.Object caller,
                  java.lang.String mouseDownMethod)

removeMouseDown

void removeMouseDown(java.lang.String mouseDownMethod)

addMouseMove

void addMouseMove(java.lang.String mouseMoveMethod)

addMouseMove

void addMouseMove(java.lang.Object caller,
                  java.lang.String mouseMoveMethod)

removeMouseMove

void removeMouseMove(java.lang.String mouseMoveMethod)

addDisabledMouseUpDown

void addDisabledMouseUpDown(java.lang.String mouseUpDownMethod)

addDisabledMouseUpDownMove

void addDisabledMouseUpDownMove(java.lang.String mouseUpDownMoveMethod)

addDisabledMouseUp

void addDisabledMouseUp(java.lang.String mouseUpMethod)

removeDisabledMouseUp

void removeDisabledMouseUp(java.lang.String mouseUpMethod)

addDisabledMouseDown

void addDisabledMouseDown(java.lang.String mouseDownMethod)

removeDisabledMouseDown

void removeDisabledMouseDown(java.lang.String mouseDownMethod)

addDisabledMouseMove

void addDisabledMouseMove(java.lang.String mouseMoveMethod)

removeDisabledMouseMove

void removeDisabledMouseMove(java.lang.String mouseMoveMethod)

addVisibleChanged

void addVisibleChanged(java.lang.String visibleChangedMethod)

removeVisibleChanged

void removeVisibleChanged(java.lang.String visibleChangedMethod)

addEnabledChanged

void addEnabledChanged(java.lang.String enableChangedMethod)

removeEnabledChanged

void removeEnabledChanged(java.lang.String enableChangedMethod)

addControlAdded

void addControlAdded(java.lang.String controlAddedMethod)

removeControlAdded

void removeControlAdded(java.lang.String controlAddedMethod)

addControlRemoved

void addControlRemoved(java.lang.String controlRemovedMethod)

removeControlRemoved

void removeControlRemoved(java.lang.String controlRemovedMethod)