com.badlogic.gdx.scenes.scene2d.utils.Disableable Java Examples
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.utils.Disableable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SimpleFormValidator.java From vis-ui with Apache License 2.0 | 6 votes |
private void updateWidgets () { for (Disableable disableable : disableTargets) { disableable.setDisabled(formInvalid); } if (messageLabel != null) { if (errorMsgText != null) { messageLabel.setText(errorMsgText); } else { messageLabel.setText(successMsg); //setText will default to "" if successMsg is null } Color targetColor = errorMsgText != null ? style.errorLabelColor : style.validLabelColor; if (targetColor != null && style.colorTransitionDuration != 0) { messageLabel.addAction(Actions.color(targetColor, style.colorTransitionDuration)); } else { messageLabel.setColor(targetColor); } } }
Example #2
Source File: IbeamListener.java From skin-composer with MIT License | 4 votes |
@Override public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) { if (!(event.getListenerActor() instanceof Disableable) || !((Disableable) event.getListenerActor()).isDisabled()) Gdx.graphics.setSystemCursor(SystemCursor.Ibeam); }
Example #3
Source File: HandListener.java From skin-composer with MIT License | 4 votes |
@Override public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) { if (!(event.getListenerActor() instanceof Disableable) || !((Disableable) event.getListenerActor()).isDisabled()) Gdx.graphics.setSystemCursor(Cursor.SystemCursor.Hand); }
Example #4
Source File: SimpleFormValidator.java From vis-ui with Apache License 2.0 | 4 votes |
/** * @param targetToDisable target actor that will be disabled if form is invalid. Eg. you can pass form Confirm button. * May be null. * @param messageLabel label that text will be changed if from is valid or invalid. May be null. */ public SimpleFormValidator (Disableable targetToDisable, Label messageLabel, FormValidatorStyle style) { this.style = style; if (targetToDisable != null) disableTargets.add(targetToDisable); this.messageLabel = messageLabel; }
Example #5
Source File: SimpleFormValidator.java From vis-ui with Apache License 2.0 | 4 votes |
public void addDisableTarget (Disableable disableable) { disableTargets.add(disableable); updateWidgets(); }
Example #6
Source File: SimpleFormValidator.java From vis-ui with Apache License 2.0 | 4 votes |
public boolean removeDisableTarget (Disableable disableable) { boolean result = disableTargets.removeValue(disableable, true); updateWidgets(); return result; }
Example #7
Source File: FormValidator.java From vis-ui with Apache License 2.0 | 4 votes |
/** @see SimpleFormValidator#SimpleFormValidator(Disableable) */ public FormValidator (Disableable targetToDisable) { super(targetToDisable); }
Example #8
Source File: FormValidator.java From vis-ui with Apache License 2.0 | 4 votes |
/** @see SimpleFormValidator#SimpleFormValidator(Disableable, Label) */ public FormValidator (Disableable targetToDisable, Label messageLabel) { super(targetToDisable, messageLabel); }
Example #9
Source File: FormValidator.java From vis-ui with Apache License 2.0 | 4 votes |
/** @see SimpleFormValidator#SimpleFormValidator(Disableable, Label, String) */ public FormValidator (Disableable targetToDisable, Label messageLabel, String styleName) { super(targetToDisable, messageLabel, styleName); }
Example #10
Source File: FormValidator.java From vis-ui with Apache License 2.0 | 4 votes |
/** @see SimpleFormValidator#SimpleFormValidator(Disableable, Label, FormValidatorStyle) */ public FormValidator (Disableable targetToDisable, Label messageLabel, FormValidatorStyle style) { super(targetToDisable, messageLabel, style); }
Example #11
Source File: SimpleFormValidator.java From vis-ui with Apache License 2.0 | 2 votes |
/** * @param targetToDisable target actor that will be disabled if form is invalid. Eg. you can pass form Confirm button. * May be null. */ public SimpleFormValidator (Disableable targetToDisable) { this(targetToDisable, null, "default"); }
Example #12
Source File: SimpleFormValidator.java From vis-ui with Apache License 2.0 | 2 votes |
/** * @param targetToDisable target actor that will be disabled if form is invalid. Eg. you can pass form Confirm button. * May be null. * @param messageLabel label that text will be changed if from is valid or invalid. May be null. */ public SimpleFormValidator (Disableable targetToDisable, Label messageLabel) { this(targetToDisable, messageLabel, "default"); }
Example #13
Source File: SimpleFormValidator.java From vis-ui with Apache License 2.0 | 2 votes |
/** * @param targetToDisable target actor that will be disabled if form is invalid. Eg. you can pass form Confirm button. * May be null. * @param messageLabel label that text will be changed if from is valid or invalid. May be null. */ public SimpleFormValidator (Disableable targetToDisable, Label messageLabel, String styleName) { this(targetToDisable, messageLabel, VisUI.getSkin().get(styleName, FormValidatorStyle.class)); }
Example #14
Source File: Draggable.java From vis-ui with Apache License 2.0 | 2 votes |
/** * @param actor might be a {@link Disableable}. * @return true if actor is disabled. */ protected boolean isDisabled (final Actor actor) { return actor instanceof Disableable && ((Disableable) actor).isDisabled(); }