public JPanel getTransformPanel() {
   final JPanel transform = new JPanel();
   transform.setAlignmentY(Component.TOP_ALIGNMENT);
   transform.setAlignmentX(Component.LEFT_ALIGNMENT);
   transform.setLayout(new BoxLayout(transform, BoxLayout.Y_AXIS));
   transform.setBorder(
       BorderFactory.createCompoundBorder(
           spaceY,
           new TitledBorder(
               null,
               Messages.getString("ImageTool.transform"), // $NON-NLS-1$
               TitledBorder.DEFAULT_JUSTIFICATION,
               TitledBorder.DEFAULT_POSITION,
               TITLE_FONT,
               TITLE_COLOR)));
   ActionState zoomAction = EventManager.getInstance().getAction(ActionW.ZOOM);
   if (zoomAction instanceof SliderChangeListener) {
     final JSliderW zoomSlider = ((SliderChangeListener) zoomAction).createSlider(0, true);
     JMVUtils.setPreferredWidth(zoomSlider, 100);
     transform.add(zoomSlider.getParent());
   }
   ActionState rotateAction = EventManager.getInstance().getAction(ActionW.ROTATION);
   if (rotateAction instanceof SliderChangeListener) {
     final JSliderW rotationSlider = ((SliderChangeListener) rotateAction).createSlider(4, true);
     JMVUtils.setPreferredWidth(rotationSlider, 100);
     transform.add(rotationSlider.getParent());
   }
   ActionState flipAction = EventManager.getInstance().getAction(ActionW.FLIP);
   if (flipAction instanceof ToggleButtonListener) {
     JPanel pane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 3));
     pane.add(
         ((ToggleButtonListener) flipAction)
             .createCheckBox(Messages.getString("ImageTool.flip"))); // $NON-NLS-1$
     transform.add(pane);
   }
   return transform;
 }
  public JPanel getWindowLevelPanel() {

    final JPanel winLevelPanel = new JPanel();
    winLevelPanel.setAlignmentY(Component.TOP_ALIGNMENT);
    winLevelPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
    winLevelPanel.setLayout(new BoxLayout(winLevelPanel, BoxLayout.Y_AXIS));
    winLevelPanel.setBorder(
        BorderFactory.createCompoundBorder(
            spaceY,
            new TitledBorder(
                null,
                Messages.getString("ImageTool.wl"), // $NON-NLS-1$
                TitledBorder.DEFAULT_JUSTIFICATION,
                TitledBorder.DEFAULT_POSITION,
                TITLE_FONT,
                TITLE_COLOR)));
    ActionState winAction = EventManager.getInstance().getAction(ActionW.WINDOW);
    if (winAction instanceof SliderChangeListener) {
      final JSliderW windowSlider = ((SliderChangeListener) winAction).createSlider(4, true);
      // windowSlider.setMajorTickSpacing((largestWindow - smallestWindow) / 4);
      JMVUtils.setPreferredWidth(windowSlider, 100);
      winLevelPanel.add(windowSlider.getParent());
    }
    ActionState levelAction = EventManager.getInstance().getAction(ActionW.LEVEL);
    if (levelAction instanceof SliderChangeListener) {
      final JSliderW levelSlider = ((SliderChangeListener) levelAction).createSlider(4, true);
      levelSlider.setMajorTickSpacing(
          (ImageViewerEventManager.LEVEL_LARGEST - ImageViewerEventManager.LEVEL_SMALLEST) / 4);
      JMVUtils.setPreferredWidth(levelSlider, 100);
      winLevelPanel.add(levelSlider.getParent());
    }
    ActionState presetAction = EventManager.getInstance().getAction(ActionW.PRESET);
    if (presetAction instanceof ComboItemListener) {
      final JPanel panel_3 = new JPanel();
      panel_3.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 3));
      final JLabel presetsLabel = new JLabel();
      panel_3.add(presetsLabel);
      presetsLabel.setText(
          Messages.getString("ImageTool.preset") + StringUtil.COLON); // $NON-NLS-1$
      final JComboBox presetComboBox = ((ComboItemListener) presetAction).createCombo(160);
      presetComboBox.setMaximumRowCount(10);
      panel_3.add(presetComboBox);
      winLevelPanel.add(panel_3);
    }
    ActionState lutAction = EventManager.getInstance().getAction(ActionW.LUT);
    if (lutAction instanceof ComboItemListener) {
      final JPanel panel_4 = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 3));
      final JLabel lutLabel = new JLabel();
      lutLabel.setText(Messages.getString("ImageTool.lut") + StringUtil.COLON); // $NON-NLS-1$
      panel_4.add(lutLabel);
      final JComboBox lutcomboBox = ((ComboItemListener) lutAction).createCombo(140);
      panel_4.add(lutcomboBox);
      ActionState invlutAction = EventManager.getInstance().getAction(ActionW.INVERT_LUT);
      if (invlutAction instanceof ToggleButtonListener) {
        panel_4.add(
            ((ToggleButtonListener) invlutAction)
                .createCheckBox(Messages.getString("ImageTool.inverse"))); // $NON-NLS-1$
      }
      winLevelPanel.add(panel_4);
    }
    ActionState filterAction = EventManager.getInstance().getAction(ActionW.FILTER);
    if (filterAction instanceof ComboItemListener) {
      final JPanel panel_4 = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 3));
      final JLabel lutLabel = new JLabel();
      lutLabel.setText(Messages.getString("ImageTool.filter")); // $NON-NLS-1$
      panel_4.add(lutLabel);
      final JComboBox filtercomboBox = ((ComboItemListener) filterAction).createCombo(160);
      panel_4.add(filtercomboBox);
      winLevelPanel.add(panel_4);
    }
    return winLevelPanel;
  }