Package uk.co.caprica.vlcj.player.base
Class Marquee
- java.lang.Object
-
- uk.co.caprica.vlcj.player.base.Marquee
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(MediaPlayer mediaPlayer)
Apply the marquee to the media player.Marquee
colour(int rgb)
Apply the text colour as RGB components.Marquee
colour(Color colour)
Apply the text colour.Marquee
disable()
Disable the marquee.Marquee
enable()
Enable the marquee.Marquee
enable(boolean enable)
Apply the initial enabled/disabled state.Color
getColour()
Get the colour if set as Color.boolean
getEnable()
Get the enabled flag.Float
getFloatOpacity()
Get the opacity if set as float.Integer
getIntegerOpacity()
Get the opacity if set as integer.MarqueePosition
getPosition()
Get the position.Integer
getRefresh()
Get the text refresh.Integer
getRgb()
Get the colour if set as RGB.Integer
getSize()
Get the text size.String
getText()
Get the text.Integer
getTimeout()
Get the timeout.Integer
getX()
Get the location x co-ordinate.Integer
getY()
Get the location y co-ordinate.Marquee
location(int x, int y)
Apply the text location in video co-ordinates.static Marquee
marquee()
Create a marquee.Marquee
opacity(float opacity)
Apply the text opacity.Marquee
opacity(int opacity)
Apply the text opacity.Marquee
position(MarqueePosition position)
Apply the text position.Marquee
refresh(int refresh)
Set the time before the marquee text will refresh.Marquee
size(int size)
Apply the text size.Marquee
text(String text)
Apply the text.Marquee
timeout(int timeout)
Apply the timeout.String
toString()
-
-
-
Method Detail
-
marquee
public static Marquee marquee()
Create a marquee.- Returns:
- marquee
-
text
public Marquee text(String text)
Apply the text.Format variables are available:
Time related: %Y = year %d = day %H = hour %M = minute %S = second
Seehttp://wiki.videolan.org/index.php?title=Documentation:Modules/marq
.If you want to use new-lines in the marquee text make sure you use the "\r\n" escape sequence - "\n" on its own will not work.
- Parameters:
text
- text- Returns:
- this
-
colour
public Marquee colour(Color colour)
Apply the text colour.- Parameters:
colour
- text colour- Returns:
- this
-
colour
public Marquee colour(int rgb)
Apply the text colour as RGB components.- Parameters:
rgb
- integer encoded red, green, blue colour components- Returns:
- this
-
opacity
public Marquee opacity(int opacity)
Apply the text opacity.- Parameters:
opacity
- opacity, 0 to 255, where 255 is fully opaque- Returns:
- this
-
opacity
public Marquee opacity(float opacity)
Apply the text opacity.- Parameters:
opacity
- opacity, 0.0 to 1.0, where 1.0 is fully opaque- Returns:
- this
-
size
public Marquee size(int size)
Apply the text size.- Parameters:
size
- text size- Returns:
- this
-
timeout
public Marquee timeout(int timeout)
Apply the timeout.The marquee will be removed when the timeout expires.
- Parameters:
timeout
- timeout, in milliseconds- Returns:
- this
-
location
public Marquee location(int x, int y)
Apply the text location in video co-ordinates.- Parameters:
x
- x ordinatey
- y ordinate- Returns:
- this
-
position
public Marquee position(MarqueePosition position)
Apply the text position.- Parameters:
position
- predefined text position- Returns:
- this
-
refresh
public Marquee refresh(int refresh)
Set the time before the marquee text will refresh.- Parameters:
refresh
- refresh time, milliseconds- Returns:
- this
-
enable
public Marquee enable(boolean enable)
Apply the initial enabled/disabled state.- Parameters:
enable
-true
to enable the marquee;false
to disable it- Returns:
- this
-
enable
public Marquee enable()
Enable the marquee.- Returns:
- this
-
disable
public Marquee disable()
Disable the marquee.- Returns:
- this
-
getText
public String getText()
Get the text.- Returns:
- text
-
getColour
public Color getColour()
Get the colour if set as Color.- Returns:
- colour
-
getRgb
public Integer getRgb()
Get the colour if set as RGB.- Returns:
- RGB
-
getIntegerOpacity
public Integer getIntegerOpacity()
Get the opacity if set as integer.- Returns:
- opacity
-
getFloatOpacity
public Float getFloatOpacity()
Get the opacity if set as float.- Returns:
- opacity
-
getSize
public Integer getSize()
Get the text size.- Returns:
- text size
-
getTimeout
public Integer getTimeout()
Get the timeout.- Returns:
- timeout
-
getX
public Integer getX()
Get the location x co-ordinate.- Returns:
- location x
-
getY
public Integer getY()
Get the location y co-ordinate.- Returns:
- location y
-
getPosition
public MarqueePosition getPosition()
Get the position.- Returns:
- position
-
getRefresh
public Integer getRefresh()
Get the text refresh.- Returns:
- refresh time, milliseconds
-
getEnable
public boolean getEnable()
Get the enabled flag.- Returns:
- enabled/disabled
-
apply
public void apply(MediaPlayer mediaPlayer)
Apply the marquee to the media player.- Parameters:
mediaPlayer
- media player
-
-