org.jivesoftware.sparkimpl.plugin.alerts
Class SparkToaster

java.lang.Object
  extended by org.jivesoftware.sparkimpl.plugin.alerts.SparkToaster

public class SparkToaster
extends java.lang.Object

Class to show tosters in multiplatform

Author:
daniele piras

Field Summary
static java.awt.Cursor DEFAULT_CURSOR
          The default Text Cursor.
static java.awt.Cursor HAND_CURSOR
          The default Hand cursor.
 
Constructor Summary
SparkToaster()
          Constructor to initialized toaster component...
 
Method Summary
 void close()
           
 javax.swing.border.Border getBorder()
           
 java.awt.Color getBorderColor()
           
 int getDisplayTime()
           
 int getMargin()
           
 java.awt.Color getMessageColor()
           
 int getStep()
           
 int getStepTime()
           
 java.lang.String getTitle()
           
 java.awt.Color getToasterColor()
           
 int getToasterHeight()
           
 java.awt.Font getToasterMessageFont()
           
 int getToasterWidth()
           
 java.awt.Window getWindow()
           
 void hideTitle()
           
static void main(java.lang.String[] args)
          Simple Example...
 void setBorder(javax.swing.border.Border border)
           
 void setBorderColor(java.awt.Color borderColor)
           
 void setComponent(java.awt.Component comp)
           
 void setCustomAction(javax.swing.Action action)
           
 void setDisplayTime(int displayTime)
           
 void setMargin(int margin)
           
 void setMessageColor(java.awt.Color messageColor)
           
 void setStep(int step)
           
 void setStepTime(int stepTime)
           
 void setTitle(java.lang.String title)
           
 void setToasterColor(java.awt.Color toasterColor)
           
 void setToasterHeight(int toasterHeight)
           
 void setToasterMessageFont(java.awt.Font f)
          Set the font for the message
 void setToasterWidth(int toasterWidth)
           
 void showToaster(javax.swing.Icon icon)
           
 void showToaster(javax.swing.Icon icon, java.lang.String msg)
          Show a toaster with the specified message and the associated icon.
 void showToaster(java.lang.String msg)
          Show a toaster with the specified message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HAND_CURSOR

public static final java.awt.Cursor HAND_CURSOR
The default Hand cursor.


DEFAULT_CURSOR

public static final java.awt.Cursor DEFAULT_CURSOR
The default Text Cursor.

Constructor Detail

SparkToaster

public SparkToaster()
Constructor to initialized toaster component...

Method Detail

showToaster

public void showToaster(javax.swing.Icon icon,
                        java.lang.String msg)
Show a toaster with the specified message and the associated icon.


showToaster

public void showToaster(javax.swing.Icon icon)

showToaster

public void showToaster(java.lang.String msg)
Show a toaster with the specified message.


getToasterMessageFont

public java.awt.Font getToasterMessageFont()
Returns:
Returns the font

setToasterMessageFont

public void setToasterMessageFont(java.awt.Font f)
Set the font for the message


getBorderColor

public java.awt.Color getBorderColor()
Returns:
Returns the borderColor.

setBorderColor

public void setBorderColor(java.awt.Color borderColor)
Parameters:
borderColor - The borderColor to set.

getDisplayTime

public int getDisplayTime()
Returns:
Returns the displayTime.

setDisplayTime

public void setDisplayTime(int displayTime)
Parameters:
displayTime - The displayTime to set.

getMargin

public int getMargin()
Returns:
Returns the margin.

setMargin

public void setMargin(int margin)
Parameters:
margin - The margin to set.

getMessageColor

public java.awt.Color getMessageColor()
Returns:
Returns the messageColor.

setMessageColor

public void setMessageColor(java.awt.Color messageColor)
Parameters:
messageColor - The messageColor to set.

getStep

public int getStep()
Returns:
Returns the step.

setStep

public void setStep(int step)
Parameters:
step - The step to set.

getStepTime

public int getStepTime()
Returns:
Returns the stepTime.

setStepTime

public void setStepTime(int stepTime)
Parameters:
stepTime - The stepTime to set.

getToasterColor

public java.awt.Color getToasterColor()
Returns:
Returns the toasterColor.

setToasterColor

public void setToasterColor(java.awt.Color toasterColor)
Parameters:
toasterColor - The toasterColor to set.

getToasterHeight

public int getToasterHeight()
Returns:
Returns the toasterHeight.

setToasterHeight

public void setToasterHeight(int toasterHeight)
Parameters:
toasterHeight - The toasterHeight to set.

getToasterWidth

public int getToasterWidth()
Returns:
Returns the toasterWidth.

setToasterWidth

public void setToasterWidth(int toasterWidth)
Parameters:
toasterWidth - The toasterWidth to set.

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getBorder

public javax.swing.border.Border getBorder()

setBorder

public void setBorder(javax.swing.border.Border border)

setCustomAction

public void setCustomAction(javax.swing.Action action)

setComponent

public void setComponent(java.awt.Component comp)

close

public void close()

getWindow

public java.awt.Window getWindow()

hideTitle

public void hideTitle()

main

public static void main(java.lang.String[] args)
Simple Example...