com.jniwrapper.win32.ui.dialogs
Class ChooseColorDialog

java.lang.Object
  extended bycom.jniwrapper.win32.ui.dialogs.ChooseColorDialog

public class ChooseColorDialog
extends java.lang.Object

ChooseColorDialog is a wrapper for the ChooseColor native dialog.


Nested Class Summary
 class ChooseColorDialog.Options
          Options class represents options set for ChooseColorDialog
 
Constructor Summary
ChooseColorDialog()
           
ChooseColorDialog(java.awt.Window owner)
           
 
Method Summary
 boolean execute()
          Opens the dialog.
 java.awt.Color getColor()
          Returns a selected color.
 java.util.List getCustomColors()
          Returns the list of custom colors selected by user.
protected  com.jniwrapper.Callback getDialogCallback()
           
 ChooseColorDialog.Options getOptions()
           
 java.awt.Window getOwner()
           
 void setColor(java.awt.Color color)
          Sets the default selected color.
 void setOwner(java.awt.Window owner)
          Sets the owner of the dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChooseColorDialog

public ChooseColorDialog()

ChooseColorDialog

public ChooseColorDialog(java.awt.Window owner)
Method Detail

getOwner

public java.awt.Window getOwner()

setOwner

public void setOwner(java.awt.Window owner)
Sets the owner of the dialog.

Parameters:
owner -

getOptions

public ChooseColorDialog.Options getOptions()
Returns:
ChooseColorDialog.Options that contains dialog options. These options customize the dialog behavior and style.

getColor

public java.awt.Color getColor()
Returns a selected color.

Returns:
selected color.

setColor

public void setColor(java.awt.Color color)
Sets the default selected color.

Parameters:
color - is color to be selected by default

getCustomColors

public java.util.List getCustomColors()
Returns the list of custom colors selected by user. Custom colors can be specified before the dialog execution. Note that only 16 custom colors can be specified and returned.

Returns:
list of custom colors

getDialogCallback

protected com.jniwrapper.Callback getDialogCallback()

execute

public boolean execute()
Opens the dialog.

Returns:
true if color selected, otherwise false