java.lang.Object
uk.co.caprica.vlcj.player.base.Marquee
Builder for a Marquee.
Use like this, with a static import of marquee():
marquee()
.opacity(200)
.position(MarqueePosition.BOTTOM)
.colour(Color.white)
.timeout(5000)
.text("vlcj is just great")
.size(20)
.enable()
.apply(mediaPlayer)
;
-
Method Summary
Modifier and TypeMethodDescriptionvoidapply(MediaPlayer mediaPlayer) Apply the marquee to the media player.colour(int rgb) Apply the text colour as RGB components.Apply the text colour.disable()Disable the marquee.enable()Enable the marquee.enable(boolean enable) Apply the initial enabled/disabled state.Get the colour if set as Color.booleanGet the enabled flag.Get the opacity if set as float.Get the opacity if set as integer.Get the position.Get the text refresh.getRgb()Get the colour if set as RGB.getSize()Get the text size.getText()Get the text.Get the timeout.getX()Get the location x co-ordinate.getY()Get the location y co-ordinate.location(int x, int y) Apply the text location in video co-ordinates.static Marqueemarquee()Create a marquee.opacity(float opacity) Apply the text opacity.opacity(int opacity) Apply the text opacity.position(MarqueePosition position) Apply the text position.refresh(int refresh) Set the time before the marquee text will refresh.size(int size) Apply the text size.Apply the text.timeout(int timeout) Apply the timeout.toString()
-
Method Details
-
marquee
Create a marquee.- Returns:
- marquee
-
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
Apply the text colour.- Parameters:
colour- text colour- Returns:
- this
-
colour
Apply the text colour as RGB components.- Parameters:
rgb- integer encoded red, green, blue colour components- Returns:
- this
-
opacity
Apply the text opacity.- Parameters:
opacity- opacity, 0 to 255, where 255 is fully opaque- Returns:
- this
-
opacity
Apply the text opacity.- Parameters:
opacity- opacity, 0.0 to 1.0, where 1.0 is fully opaque- Returns:
- this
-
size
Apply the text size.- Parameters:
size- text size- Returns:
- this
-
timeout
Apply the timeout.The marquee will be removed when the timeout expires.
- Parameters:
timeout- timeout, in milliseconds- Returns:
- this
-
location
Apply the text location in video co-ordinates.- Parameters:
x- x ordinatey- y ordinate- Returns:
- this
-
position
Apply the text position.- Parameters:
position- predefined text position- Returns:
- this
-
refresh
Set the time before the marquee text will refresh.- Parameters:
refresh- refresh time, milliseconds- Returns:
- this
-
enable
Apply the initial enabled/disabled state.- Parameters:
enable-trueto enable the marquee;falseto disable it- Returns:
- this
-
enable
Enable the marquee.- Returns:
- this
-
disable
Disable the marquee.- Returns:
- this
-
getText
Get the text.- Returns:
- text
-
getColour
Get the colour if set as Color.- Returns:
- colour
-
getRgb
Get the colour if set as RGB.- Returns:
- RGB
-
getIntegerOpacity
Get the opacity if set as integer.- Returns:
- opacity
-
getFloatOpacity
Get the opacity if set as float.- Returns:
- opacity
-
getSize
Get the text size.- Returns:
- text size
-
getTimeout
Get the timeout.- Returns:
- timeout
-
getX
Get the location x co-ordinate.- Returns:
- location x
-
getY
Get the location y co-ordinate.- Returns:
- location y
-
getPosition
Get the position.- Returns:
- position
-
getRefresh
Get the text refresh.- Returns:
- refresh time, milliseconds
-
getEnable
public boolean getEnable()Get the enabled flag.- Returns:
- enabled/disabled
-
apply
Apply the marquee to the media player.- Parameters:
mediaPlayer- media player
-
toString
-