com.michaelbaranov.microba.gradienteditor
Class GradientEditor
GradientBar
com.michaelbaranov.microba.gradienteditor.GradientEditor
public class GradientEditor
extends GradientBar
IMPORTANT: alpha featre not implemented. Stubs only. No alpha marker bar yet.
This is a component for displaying/modifying a gradient (palette).
Implementation details:
This implementation combines a
GradientBar
with two
MarkerBar
components. The marker bars are used to provide editing capabilities to the
gradient bar. Note, that this component doesn't provide direct
color-selecting capabilitied but relies on other external components such as
JColorChooser
.
PROPERTY_ALPHA_MUTATION_MODEL
public static final String PROPERTY_ALPHA_MUTATION_MODEL
The name of a "alphaMutationModel" property.
PROPERTY_ALPHA_SELECTION_MODEL
public static final String PROPERTY_ALPHA_SELECTION_MODEL
The name of a "alphaSelectionModel" property.
PROPERTY_COLOR_MUTATION_MODEL
public static final String PROPERTY_COLOR_MUTATION_MODEL
The name of a "colorMutationModel" property.
PROPERTY_COLOR_SELECTION_MODEL
public static final String PROPERTY_COLOR_SELECTION_MODEL
The name of a "colorSelectionModel" property.
GradientEditor
public GradientEditor()
Constructor.
getAlphaMutationModel
public MarkerMutationModel getAlphaMutationModel()
Regturns the current alpha mutation model.
- current alpha mutation model
getAlphaSelectionModel
public ListSelectionModel getAlphaSelectionModel()
Returns current alpha selection model.
- current alpha selection model.
getColorMutationModel
public MarkerMutationModel getColorMutationModel()
Regturns the current color mutation model.
- current color mutation model
getColorSelectionModel
public ListSelectionModel getColorSelectionModel()
Returns current color selection model.
- current color selection model.
getUIClassID
public String getUIClassID()
setAlphaMutationModel
public void setAlphaMutationModel(MarkerMutationModel mutationModel)
Replaces current alpha mutation model with given one.
mutationModel
- new mutation model. May be null
.
setAlphaSelectionModel
public void setAlphaSelectionModel(ListSelectionModel selectionModel)
Replaces current alpha selection model with given one. This
implementation uses
ListSelectionModel.getLeadSelectionIndex()
to
determine selected marker.
selectionModel
- new selection model. May be null
.
setColorMutationModel
public void setColorMutationModel(MarkerMutationModel mutationModel)
Replaces current color mutation model with given one.
mutationModel
- new mutation model. May be null
.
setColorSelectionModel
public void setColorSelectionModel(ListSelectionModel selectionModel)
Replaces current color selection model with given one. This
implementation uses
ListSelectionModel.getLeadSelectionIndex()
to
determine selected marker.
selectionModel
- new selection model. May be null
.