Package net.sourceforge.dsnk.model

Examples of net.sourceforge.dsnk.model.AbstractGump


 
  @Override
  public void actionPerformed(ActionEvent e) {
    Object obj = paperdollList.getSelectedValue();
    if (obj != null) {
      AbstractGump gump = (AbstractGump) obj;
      paperdollVector.remove(gump);
      gumpCanvas.removeGump(gump);
      paperdollList.setListData(paperdollVector);
      gumpCanvas.repaint();
    }
View Full Code Here


      g.drawImage(img, 0, 0, null);
      g.dispose();
      img = tmp;
    }

    AbstractGump gump = new ExternalGump(gumpFile);
    gump.setImage(img);
    gump.setTransparent(true);
    paperdollVector.add(gump);
    paperdollList.setListData(paperdollVector);
    gumpCanvas.addGump(gump);
    gumpCanvas.repaint();
  }
View Full Code Here

 
  @Override
  public void actionPerformed(ActionEvent e) {
    Object obj = paperdollList.getSelectedValue();
    if (obj != null) {
      AbstractGump gump = (AbstractGump) obj;
      int index = paperdollVector.indexOf(gump);
      if (index != 0) {
        paperdollVector.remove(gump);
        paperdollVector.insertElementAt(gump, index - 1);
        paperdollList.setListData(paperdollVector);
View Full Code Here

  @Override
  public void actionPerformed(ActionEvent e) {
    Object obj = paperdollList.getSelectedValue();
    if (obj != null) {
      AbstractGump gump = (AbstractGump) obj;
      gump.setVisible(!gump.isVisible());
      gumpCanvas.repaint();
      paperdollList.repaint();
    }
  }
View Full Code Here

  @Override
  public void actionPerformed(ActionEvent e) {
    Object obj = paperdollList.getSelectedValue();
    if (obj != null) {
      AbstractGump gump = (AbstractGump) obj;
      gump.setHueEntry(null);
      gumpCanvas.repaint();
    }
  }
View Full Code Here

    HueEntry hueEntry = ColorPickerDialog.showDialog(parentWindow,
        dataProvider.getHueEntries());

    Object obj = paperdollList.getSelectedValue();
    if (obj != null) {
      AbstractGump gump = (AbstractGump) obj;
      gump.setHueEntry(hueEntry);
      gumpCanvas.repaint();
    }
  }
View Full Code Here

      if (!path.endsWith(".png")) {
        path = path.concat(".png");
      }
      File outFile = new File(path);
     
      AbstractGump gump = previewCanvas.getGumpAt(0);
      if (gump != null) {
        BufferedImage img = (BufferedImage) gump.getImage();
        try {
          ImageIO.write(img, "png", outFile);
        } catch (IOException e1) {
          String msg = UOGumpViewer.getResourceBundle().getString(
              "UOGumpViewer.Message.CouldNotSaveGump");
View Full Code Here

 
  @Override
  public void actionPerformed(ActionEvent e) {
    Object obj = paperdollList.getSelectedValue();
    if (obj != null) {
      AbstractGump gump = (AbstractGump) obj;
      int index = paperdollVector.indexOf(gump);
      if (index != paperdollVector.size() - 1) {
        paperdollVector.remove(gump);
        paperdollVector.insertElementAt(gump, index + 1);
        paperdollList.setListData(paperdollVector);
View Full Code Here

   *
   * @param oldIndex old index of the gump
   * @param newIndex new index of the gump
   */
  public void switchGumpPosition(int oldIndex, int newIndex) {
    AbstractGump gump1 = gumps.elementAt(oldIndex);
    AbstractGump gump2 = gumps.elementAt(newIndex);
    gumps.setElementAt(gump1, newIndex);
    gumps.setElementAt(gump2, oldIndex);
  }
View Full Code Here

      setBackground(list.getBackground());
      setForeground(list.getForeground());
    }

    if (!drawVisibleSymbol &&(value instanceof AbstractGump)) {
      AbstractGump gump = (AbstractGump) value;
      String id = gump.toString().substring(2);
      setText(" ".concat(id));
    } else {
      setText(value.toString());
    }
    setFont(list.getFont());
View Full Code Here

TOP

Related Classes of net.sourceforge.dsnk.model.AbstractGump

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.