APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.badlogic.gdx.tools.hiero.unicodefont.effects

public Class EffectUtil

extends Object
Class Inheritance
Imports
java.awt.AlphaComposite, .Color, .Dimension, .EventQueue, .Graphics2D, .GridBagConstraints, .GridBagLayout, .Insets, java.awt.event.ActionEvent, .ActionListener, java.awt.image.BufferedImage, javax.swing.BorderFactory, .DefaultComboBoxModel, .JButton, .JCheckBox, .JColorChooser, .JComboBox, .JComponent, .JDialog, .JLabel, .JPanel, .JSpinner, .JTextArea, .SpinnerNumberModel, com.badlogic.gdx.tools.hiero.unicodefont.GlyphPage, com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value

Provides utility methods for effects.
Author
Nathan Sweet

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
EffectUtil.DefaultValue

Provides generic functionality for an effect's configurable value.

private static class
EffectUtil.ValueDialog

Provides generic functionality for a dialog to configure a value.

Field Summary

Modifier and TypeField and Description
private static BufferedImage

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ConfigurableEffect.Value
booleanValue(String name, final boolean currentValue, final String description)

Returns a value that represents a boolean.

public static ConfigurableEffect.Value
colorValue(String name, Color currentValue)

Returns a value that represents a color.

public static ConfigurableEffect.Value
floatValue(String name, final float currentValue, final float min, final float max, final String description)

Returns a value that represents a float, from 0 to 1 (inclusive).

public static Color
fromString(String rgb)

Converts a string to a color.

public static BufferedImage
getScratchImage()

Returns an image that can be used by effects as a temp image.

public static ConfigurableEffect.Value
intValue(String name, final int currentValue, final String description)

Returns a value that represents an int.

public static ConfigurableEffect.Value
optionValue(String name, final String currentValue, final String[][]
The first array has an entry for each option. Each entry is either a String[1] that is both the display value and actual value, or a String[2] whose first element is the display value and second element is the actual value.
options
,
final String description)

Returns a value that represents a fixed number of options.

public static String
toString(Color color)

Convers a color to a string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

scratchImageback to summary
private static BufferedImage scratchImage

Constructor Detail

EffectUtilback to summary
public EffectUtil()

Method Detail

booleanValueback to summary
public static ConfigurableEffect.Value booleanValue(String name, final boolean currentValue, final String description)

Returns a value that represents a boolean.

colorValueback to summary
public static ConfigurableEffect.Value colorValue(String name, Color currentValue)

Returns a value that represents a color.

floatValueback to summary
public static ConfigurableEffect.Value floatValue(String name, final float currentValue, final float min, final float max, final String description)

Returns a value that represents a float, from 0 to 1 (inclusive).

fromStringback to summary
public static Color fromString(String rgb)

Converts a string to a color.

getScratchImageback to summary
public static BufferedImage getScratchImage()

Returns an image that can be used by effects as a temp image.

intValueback to summary
public static ConfigurableEffect.Value intValue(String name, final int currentValue, final String description)

Returns a value that represents an int.

optionValueback to summary
public static ConfigurableEffect.Value optionValue(String name, final String currentValue, final String[][] options, final String description)

Returns a value that represents a fixed number of options. All options are strings.

Parameters
options:String[][]

The first array has an entry for each option. Each entry is either a String[1] that is both the display value and actual value, or a String[2] whose first element is the display value and second element is the actual value.

toStringback to summary
public static String toString(Color color)

Convers a color to a string.

com.badlogic.gdx.tools.hiero.unicodefont.effects back to summary

private abstract Class EffectUtil.DefaultValue

extends Object
implements Value
Class Inheritance
  • java.lang.Object
  • com.badlogic.gdx.tools.hiero.unicodefont.effects.EffectUtil.DefaultValue
All Implemented Interfaces
com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value

Provides generic functionality for an effect's configurable value.

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv String

Constructor Summary

AccessConstructor and Description
public
DefaultValue(String name, String value)

Method Summary

Modifier and TypeMethod and Description
public String
public String
public void
setString(String value)

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value.setString.

Sets the string representation of the value.

public boolean
showValueDialog(final JComponent component, String description)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
pack-priv String name
valueback to summary
pack-priv String value

Constructor Detail

DefaultValueback to summary
public DefaultValue(String name, String value)

Method Detail

getNameback to summary
public String getName()

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value.getName.

Doc from com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value.getName.

Returns the name of the value.

getStringback to summary
public String getString()

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value.getString.

Doc from com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value.getString.

Gets the string representation of the value.

setStringback to summary
public void setString(String value)

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value.setString.

Doc from com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.Value.setString.

Sets the string representation of the value.

showValueDialogback to summary
public boolean showValueDialog(final JComponent component, String description)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

com.badlogic.gdx.tools.hiero.unicodefont.effects back to summary

private Class EffectUtil.ValueDialog

extends JDialog
Class Inheritance

Provides generic functionality for a dialog to configure a value.

Field Summary

Modifier and TypeField and Description
public boolean
Inherited from javax.swing.JDialog:
accessibleContextrootPanerootPaneCheckingEnabled

Constructor Summary

AccessConstructor and Description
public
ValueDialog(JComponent component, String name, String description)

Method Summary

Inherited from javax.swing.JDialog:
addImplcreateRootPanedialogInitgetAccessibleContextgetContentPanegetDefaultCloseOperationgetGlassPanegetGraphicsgetJMenuBargetLayeredPanegetRootPanegetTransferHandlerisDefaultLookAndFeelDecoratedisRootPaneCheckingEnabledparamStringprocessWindowEventremoverepaintsetContentPanesetDefaultCloseOperationsetDefaultLookAndFeelDecoratedsetGlassPanesetJMenuBarsetLayeredPanesetLayoutsetRootPanesetRootPaneCheckingEnabledsetTransferHandlerupdate

Field Detail

okPressedback to summary
public boolean okPressed

Constructor Detail

ValueDialogback to summary
public ValueDialog(JComponent component, String name, String description)