| class ColorListener implements ActionListener, AdjustmentListener {
// Listens to events from components of a ColorPresenter
private ColorPresenter presentation;
private INColor currentColor;
public ColorListener (ColorPresenter presentation){
this.presentation = presentation;
}
public void actionPerformed(ActionEvent action){
presentation.adjust();
}
public void adjustmentValueChanged (AdjustmentEvent adjustment){
presentation.sliderAdjust((Scrollbar)adjustment.getAdjustable(),
adjustment.getValue());
}
} // end class ColorListener |