// Path: src/chibipaint/gui/CPIconButton.java
// public class CPIconButton extends JComponent implements MouseListener
// {
// 
// private final Image icons;
// private final int iconW;
// private final int iconH;
// private final int iconIndex;
// private final int border;
// private CPCommandId commandId;
// private CPCommandId doubleClickCommandId;
// private final ArrayList<ICPController> controllers = new ArrayList<ICPController> ();
// 
// private boolean mouseOver = false;
// private boolean mousePressed = false;
// private boolean selected = false;
// 
// public CPIconButton (Image icons, int iconW, int iconH, int iconIndex, int border)
// {
//   this.icons = icons;
//   this.iconW = iconW;
//   this.iconH = iconH;
//   this.iconIndex = iconIndex;
//   this.border = border;
// 
//   MediaTracker tracker = new MediaTracker (this);
//   tracker.addImage (icons, 0);
//   try
//     {
//       tracker.waitForAll ();
//     }
//   catch (Exception ignored)
//     {
//     }
// 
//   addMouseListener (this);
// }
// 
// public void setSelected (boolean s)
// {
//   if (selected != s)
//     {
//       selected = s;
//       repaint ();
//     }
// }
// 
// @Override
// public void paint (Graphics g)
// {
//   Dimension d = getSize ();
//   g.drawImage (icons, border, border, iconW + border, iconH + border, 0, iconIndex * iconH, iconW, (iconIndex + 1)
//           * iconH, null);
// 
//   if (!this.isEnabled ())
//     {
//       g.setColor (Color.lightGray);
//     }
//   else if (mouseOver && !mousePressed)
//     {
//       g.setColor (Color.orange);
//     }
//   else if (selected || mousePressed)
//     {
//       g.setColor (Color.red);
//     }
//   else
//     {
//       g.setColor (Color.black);
//     }
// 
//   g.drawRect (0, 0, d.width - 1, d.height - 1);
// }
// 
// @Override
// public void mouseClicked (MouseEvent e)
// {
//   if (e.getClickCount () == 2 && doubleClickCommandId != null)
//     {
//       for (ICPController controller : controllers)
//         controller.performCommand (doubleClickCommandId, new CPCommandSettings.SourceIconButton (this));
//     }
// }
// 
// @Override
// public void mouseEntered (MouseEvent e)
// {
//   mouseOver = true;
//   repaint ();
// }
// 
// @Override
// public void mouseExited (MouseEvent e)
// {
//   mouseOver = false;
//   repaint ();
// }
// 
// @Override
// public void mousePressed (MouseEvent e)
// {
//   requestFocusInWindow ();
// 
//   if (!this.isEnabled ())
//     return;
// 
//   mousePressed = true;
//   repaint ();
// }
// 
// @Override
// public void mouseReleased (MouseEvent e)
// {
//   if (!this.isEnabled ())
//     return;
// 
//   if (mouseOver)
//     {
//       for (ICPController controller : controllers)
//         controller.performCommand (commandId, new CPCommandSettings.SourceIconButton (this));
//     }
//   mousePressed = false;
//   repaint ();
// }
// 
// void addController (ICPController l)
// {
//   controllers.add (l);
// }
// 
// void setCPActionCommand (CPCommandId command)
// {
//   commandId = command;
// }
// 
// public void setCPActionCommandDouble (CPCommandId command)
// {
//   doubleClickCommandId = command;
// }
// 
// @Override
// public Dimension getPreferredSize ()
// {
//   return new Dimension (iconW + 2 * border, iconH + 2 * border);
// }
// 
// @Override
// public Dimension getMaximumSize ()
// {
//   return getPreferredSize ();
// }
// 
// @Override
// public Dimension getMinimumSize ()
// {
//   return getPreferredSize ();
// }
// 
// }
// 
// Path: src/chibipaint/util/CPEnums.java
// public class CPEnums
// {
// public static enum Direction
// {
//   Up,
//   Down,
//   Left,
//   Right,
//   Invalid;
// 
//   public static Direction fromKeyEvent (KeyEvent event)
//   {
//     switch (event.getKeyCode ())
//       {
//       case KeyEvent.VK_LEFT:
//         return Left;
//       case KeyEvent.VK_RIGHT:
//         return Right;
//       case KeyEvent.VK_UP:
//         return Up;
//       case KeyEvent.VK_DOWN:
//         return Down;
//       default:
//         return Invalid;
//       }
//   }
// }
// }


import chibipaint.util.CPEnums;
import chibipaint.gui.CPIconButton;
  public RecentFileNumber (int numberArg)
  {
    number = numberArg;
  }
}

public class CheckBoxState implements CPCommandSettings
{
  public final boolean checked;

  public CheckBoxState (boolean checkedArg)
  {
    checked = checkedArg;
  }
}

public class DirectionSettings implements CPCommandSettings
{
  public final CPEnums.Direction direction;

  public DirectionSettings (CPEnums.Direction directionArg)
  {
    direction = directionArg;
  }
}

// This is because icon button rely heavily on this
// TODO: remove this logic
public class SourceIconButton implements CPCommandSettings
{
// Path: src/chibipaint/gui/CPIconButton.java
// public class CPIconButton extends JComponent implements MouseListener
// {
// 
// private final Image icons;
// private final int iconW;
// private final int iconH;
// private final int iconIndex;
// private final int border;
// private CPCommandId commandId;
// private CPCommandId doubleClickCommandId;
// private final ArrayList<ICPController> controllers = new ArrayList<ICPController> ();
// 
// private boolean mouseOver = false;
// private boolean mousePressed = false;
// private boolean selected = false;
// 
// public CPIconButton (Image icons, int iconW, int iconH, int iconIndex, int border)
// {
//   this.icons = icons;
//   this.iconW = iconW;
//   this.iconH = iconH;
//   this.iconIndex = iconIndex;
//   this.border = border;
// 
//   MediaTracker tracker = new MediaTracker (this);
//   tracker.addImage (icons, 0);
//   try
//     {
//       tracker.waitForAll ();
//     }
//   catch (Exception ignored)
//     {
//     }
// 
//   addMouseListener (this);
// }
// 
// public void setSelected (boolean s)
// {
//   if (selected != s)
//     {
//       selected = s;
//       repaint ();
//     }
// }
// 
// @Override
// public void paint (Graphics g)
// {
//   Dimension d = getSize ();
//   g.drawImage (icons, border, border, iconW + border, iconH + border, 0, iconIndex * iconH, iconW, (iconIndex + 1)
//           * iconH, null);
// 
//   if (!this.isEnabled ())
//     {
//       g.setColor (Color.lightGray);
//     }
//   else if (mouseOver && !mousePressed)
//     {
//       g.setColor (Color.orange);
//     }
//   else if (selected || mousePressed)
//     {
//       g.setColor (Color.red);
//     }
//   else
//     {
//       g.setColor (Color.black);
//     }
// 
//   g.drawRect (0, 0, d.width - 1, d.height - 1);
// }
// 
// @Override
// public void mouseClicked (MouseEvent e)
// {
//   if (e.getClickCount () == 2 && doubleClickCommandId != null)
//     {
//       for (ICPController controller : controllers)
//         controller.performCommand (doubleClickCommandId, new CPCommandSettings.SourceIconButton (this));
//     }
// }
// 
// @Override
// public void mouseEntered (MouseEvent e)
// {
//   mouseOver = true;
//   repaint ();
// }
// 
// @Override
// public void mouseExited (MouseEvent e)
// {
//   mouseOver = false;
//   repaint ();
// }
// 
// @Override
// public void mousePressed (MouseEvent e)
// {
//   requestFocusInWindow ();
// 
//   if (!this.isEnabled ())
//     return;
// 
//   mousePressed = true;
//   repaint ();
// }
// 
// @Override
// public void mouseReleased (MouseEvent e)
// {
//   if (!this.isEnabled ())
//     return;
// 
//   if (mouseOver)
//     {
//       for (ICPController controller : controllers)
//         controller.performCommand (commandId, new CPCommandSettings.SourceIconButton (this));
//     }
//   mousePressed = false;
//   repaint ();
// }
// 
// void addController (ICPController l)
// {
//   controllers.add (l);
// }
// 
// void setCPActionCommand (CPCommandId command)
// {
//   commandId = command;
// }
// 
// public void setCPActionCommandDouble (CPCommandId command)
// {
//   doubleClickCommandId = command;
// }
// 
// @Override
// public Dimension getPreferredSize ()
// {
//   return new Dimension (iconW + 2 * border, iconH + 2 * border);
// }
// 
// @Override
// public Dimension getMaximumSize ()
// {
//   return getPreferredSize ();
// }
// 
// @Override
// public Dimension getMinimumSize ()
// {
//   return getPreferredSize ();
// }
// 
// }
// 
// Path: src/chibipaint/util/CPEnums.java
// public class CPEnums
// {
// public static enum Direction
// {
//   Up,
//   Down,
//   Left,
//   Right,
//   Invalid;
// 
//   public static Direction fromKeyEvent (KeyEvent event)
//   {
//     switch (event.getKeyCode ())
//       {
//       case KeyEvent.VK_LEFT:
//         return Left;
//       case KeyEvent.VK_RIGHT:
//         return Right;
//       case KeyEvent.VK_UP:
//         return Up;
//       case KeyEvent.VK_DOWN:
//         return Down;
//       default:
//         return Invalid;
//       }
//   }
// }
// }


// Path: src/chibipaint/controller/CPCommandSettings.java
import chibipaint.util.CPEnums;
import chibipaint.gui.CPIconButton;

  public RecentFileNumber (int numberArg)
  {
    number = numberArg;
  }
}

public class CheckBoxState implements CPCommandSettings
{
  public final boolean checked;

  public CheckBoxState (boolean checkedArg)
  {
    checked = checkedArg;
  }
}

public class DirectionSettings implements CPCommandSettings
{
  public final CPEnums.Direction direction;

  public DirectionSettings (CPEnums.Direction directionArg)
  {
    direction = directionArg;
  }
}

// This is because icon button rely heavily on this
// TODO: remove this logic
public class SourceIconButton implements CPCommandSettings
{
  public final CPIconButton button;