Class RMSoundShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener

public class RMSoundShape extends RMShape
This class represents a sound in a document.
  • Constructor Details

    • RMSoundShape

      public RMSoundShape()
      Creates an empty sound shape.
    • RMSoundShape

      public RMSoundShape(Object aSource)
      Creates a sound shape from a given source (File, String path, InputStream, byte array, etc.).
  • Method Details

    • getSource

      public Object getSource()
      For the moment, this has to be here for binding.
    • setSource

      public void setSource(Object aSource)
      Sets the source of the sound (File, String path, InputStream, byte array, etc.).
    • getSoundData

      public RMSoundData getSoundData()
      Returns the sound data for this sound shape.
    • setSoundData

      public void setSoundData(RMSoundData aSoundData)
      Sets the sound data for this sound shape.
    • getKey

      public String getKey()
      Returns the RPG key for this sound shape.
    • setKey

      public void setKey(String aKey)
      Sets the RPG key for this sound shape.
    • getDelay

      public float getDelay()
      Returns the delay after which this sound is supposed to start to play.
    • setDelay

      public void setDelay(float aValue)
      Sets the delay after which this sound is supposed to start to play.
    • getLoopCount

      public int getLoopCount()
      Returns the number of loops that this sound should play before stopping.
    • setLoopCount

      public void setLoopCount(int aValue)
      Returns the number of loops that this sound should play before stopping.
    • getOverlap

      public boolean getOverlap()
      Returns whether this sound should overlap other sounds.
    • setOverlap

      public void setOverlap(boolean aValue)
      Returns whether this sound should overlap other sounds.
    • getSoundName

      public String getSoundName()
      Returns the name of the sound.
    • getPlaying

      public boolean getPlaying()
      Returns whether this sound is currently playing.
    • setPlaying

      public void setPlaying(boolean aValue)
      Sets whether or not this sound is currently playing.
    • rptShape

      public RMShape rptShape(ReportOwner anRptOwner)
      Report generation method.
    • getClip

      public Clip getClip()
      Returns the clip.
    • getClip

      public Clip getClip(boolean create)
      Returns the clip, creating it if requested.
    • shapeShown

      protected void shapeShown()
      Overrides shape implementation to start sound if it should be playing.
      Overrides:
      shapeShown in class RMShape
    • shapeHidden

      protected void shapeHidden()
      Overrides shape implementation to stop sound.
      Overrides:
      shapeHidden in class RMShape
    • paintShape

      public void paintShape(RMShapePainter aPntr)
      Handles painting a sound shape.
      Overrides:
      paintShape in class RMShape
    • getPropertyNames

      protected void getPropertyNames(List<String> aList)
      Overridden to add 'Source' & 'Playing' to the list of property names you can bind to.
      Overrides:
      getPropertyNames in class RMShape
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
      Specified by:
      toXML in interface Archivable
      Overrides:
      toXML in class RMShape
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Specified by:
      fromXML in interface Archivable
      Overrides:
      fromXML in class RMShape