com.threerings.opengl.gui.config
Class CursorConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.config.ManagedConfig
          extended by com.threerings.opengl.gui.config.CursorConfig
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, Exportable, ResourceManager.ModificationObserver, Copyable, Cloneable

public class CursorConfig
extends ManagedConfig

Describes a cursor.


Field Summary
protected  SoftReference<Cursor> _cursor
          The cached cursor.
 ColorizationConfig[] colorizations
          Colorizations to apply to the cursor.
 int hotSpotX
          The hot spot x coordinate.
 int hotSpotY
          The hot spot y coordinate.
 String image
          The cursor image.
 
Fields inherited from class com.threerings.config.ManagedConfig
_cfgmgr, _listeners, _name, _updateConfigs, _updateResources
 
Constructor Summary
CursorConfig()
           
 
Method Summary
protected  void fireConfigUpdated()
          Fires a configuration updated event.
 Cursor getCursor(GlContext ctx)
          Returns the cursor corresponding to this config.
protected  void getUpdateResources(HashSet<String> paths)
          Collects the paths of all resources referenced by this config that, when modified, should trigger a call to ManagedConfig.fireConfigUpdated().
 
Methods inherited from class com.threerings.config.ManagedConfig
addListener, addUpdateDependencies, clearUpdateDependencies, configUpdated, getConfigManager, getInstance, getInstance, getInstance, getInstance, getInstance, getName, getReference, getUpdateReferences, init, maybeFireOnConfigManager, removeListener, resourceModified, setName, updateFromSource, validateOuters, validateReferences, wasUpdated
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

image

@Editable(editor="resource",
          nullable=true)
@FileConstraints(description="m.image_files_desc",
                 extensions={".png",".jpg"},
                 directory="image_dir")
public String image
The cursor image.


colorizations

@Editable
public ColorizationConfig[] colorizations
Colorizations to apply to the cursor.


hotSpotX

@Editable(min=0.0,
          hgroup="h")
public int hotSpotX
The hot spot x coordinate.


hotSpotY

@Editable(min=0.0,
          hgroup="h")
public int hotSpotY
The hot spot y coordinate.


_cursor

@DeepOmit
protected transient SoftReference<Cursor> _cursor
The cached cursor.

Constructor Detail

CursorConfig

public CursorConfig()
Method Detail

getCursor

public Cursor getCursor(GlContext ctx)
Returns the cursor corresponding to this config.


fireConfigUpdated

protected void fireConfigUpdated()
Description copied from class: ManagedConfig
Fires a configuration updated event.

Overrides:
fireConfigUpdated in class ManagedConfig

getUpdateResources

protected void getUpdateResources(HashSet<String> paths)
Description copied from class: ManagedConfig
Collects the paths of all resources referenced by this config that, when modified, should trigger a call to ManagedConfig.fireConfigUpdated().

Overrides:
getUpdateResources in class ManagedConfig