ViewerAction a = controller.getAction(ImViewerControl.COLOR_PICKER); colorPickerButton = new JButton(a); colorPickerButton.addMouseListener((ColorPickerAction) a); UIUtilities.unifiedButtonLookAndFeel(colorPickerButton);
    private void initComponents()    {        ViewerAction[] zoomingActions = new ViewerAction[12];        zoomingActions[0] = controller.getAction(ImViewerControl.ZOOM_25);        zoomingActions[1] = controller.getAction(ImViewerControl.ZOOM_50);        zoomingActions[2] = controller.getAction(ImViewerControl.ZOOM_75);        zoomingActions[3] = controller.getAction(ImViewerControl.ZOOM_100);        zoomingActions[4] = controller.getAction(ImViewerControl.ZOOM_125);        zoomingActions[5] = controller.getAction(ImViewerControl.ZOOM_150);        zoomingActions[6] = controller.getAction(ImViewerControl.ZOOM_175);        zoomingActions[7] = controller.getAction(ImViewerControl.ZOOM_200);        zoomingActions[8] = controller.getAction(ImViewerControl.ZOOM_225);        zoomingActions[9] = controller.getAction(ImViewerControl.ZOOM_250);        zoomingActions[10] = controller.getAction(ImViewerControl.ZOOM_275);        zoomingActions[11] = controller.getAction(ImViewerControl.ZOOM_300);        zoomingBox =  new JComboBox(zoomingActions);        zoomingBox.setEnabled(false);        ViewerAction[] ratingActions = new ViewerAction[5];        ratingActions[0] = controller.getAction(ImViewerControl.RATING_ONE);        ratingActions[1] = controller.getAction(ImViewerControl.RATING_TWO);        ratingActions[2] = controller.getAction(ImViewerControl.RATING_THREE);        ratingActions[3] = controller.getAction(ImViewerControl.RATING_FOUR);        ratingActions[4] = controller.getAction(ImViewerControl.RATING_FIVE);        ratingBox =  new JComboBox(ratingActions);        ratingBox.setEnabled(false);        zSlider = new OneKnobSlider(JSlider.VERTICAL, 0, 1, 0);        zSlider.setEnabled(false);        tSlider = new OneKnobSlider(JSlider.VERTICAL, 0, 1, 0);        tSlider.setEnabled(false);        //zSlider.addChangeListener(this);        //tSlider.addChangeListener(this);        channelMovieButton = new JButton(                controller.getAction(ImViewerControl.CHANNEL_MOVIE));        UIUtilities.unifiedButtonLookAndFeel(channelMovieButton);        colorModelButton = new JButton();        UIUtilities.unifiedButtonLookAndFeel(colorModelButton);        colorModelButton.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent e)            {                String m = model.getColorModel();                ViewerAction a = null;                if (m.equals(ImViewer.RGB_MODEL) ||                    m.equals(ImViewer.HSB_MODEL)) {                     a = controller.getAction(ImViewerControl.GREY_SCALE_MODEL);                } else if (m.equals(ImViewer.GREY_SCALE_MODEL)) {                     a = controller.getAction(ImViewerControl.RGB_MODEL);                }                    a.actionPerformed(e);            }                });    }