Package org.w3c.tools.widgets

Examples of org.w3c.tools.widgets.ImageButton


    public Component getComponent() {
  return widget;
    }

   public DateAttributeEditor() {
       ImageButton pl, mi;
       Panel p, arrows;
       DateActionListener dae;
       PropertyManager pm = PropertyManager.getPropertyManager();

       Image up = Toolkit.getDefaultToolkit().getImage(
     pm.getIconLocation("pup"));
       Image down = Toolkit.getDefaultToolkit().getImage(
     pm.getIconLocation("pdown"));

       widget = new Panel(new GridLayout(2,1,1,1));

       Panel time = new BorderPanel(BorderPanel.IN);
       time.setLayout(new GridLayout(1,3));

       Panel date = new BorderPanel(BorderPanel.IN);
       date.setLayout(new GridLayout(1,3));

       // add the "hour" panel
       h = new Label();
       h.setAlignment(Label.CENTER);
       dae = new DateActionListener(Calendar.HOUR_OF_DAY);

       pl = new ImageButton(up);
       pl.addActionListener(dae);
       pl.setActionCommand("+");

       mi = new ImageButton(down);
       mi.addActionListener(dae);
       mi.setActionCommand("-");

       arrows = new Panel(new GridLayout(2,1));
       arrows.add(pl);
       arrows.add(mi);
       p = new Panel(new BorderLayout());
       p.add(h, "Center");
       p.add(arrows, "East");
       time.add(p);

       // add the "min" panel
       min = new Label();
       min.setAlignment(Label.CENTER);
       dae = new DateActionListener(Calendar.MINUTE);

       pl = new ImageButton(up);
       pl.addActionListener(dae);
       pl.setActionCommand("+");

       mi = new ImageButton(down);
       mi.addActionListener(dae);
       mi.setActionCommand("-");

       arrows = new Panel(new GridLayout(2,1));
       arrows.add(pl);
       arrows.add(mi);
       p = new Panel(new BorderLayout());
       p.add(min, "Center");
       p.add(arrows, "East");
       time.add(p);

       s = new Label();
       s.setAlignment(Label.CENTER);
       dae = new DateActionListener(Calendar.SECOND);

       pl = new ImageButton(up);
       pl.addActionListener(dae);
       pl.setActionCommand("+");

       mi = new ImageButton(down);
       mi.addActionListener(dae);
       mi.setActionCommand("-");

       arrows = new Panel(new GridLayout(2,1));
       arrows.add(pl);
       arrows.add(mi);
       p = new Panel(new BorderLayout());
       p.add(s, "Center");
       p.add(arrows, "East");
       time.add(p);

       // add the "day" panel
       d = new Label();
       d.setAlignment(Label.CENTER);
       dae = new DateActionListener(Calendar.DAY_OF_MONTH);

       pl = new ImageButton(up);
       pl.addActionListener(dae);
       pl.setActionCommand("+");

       mi = new ImageButton(down);
       mi.addActionListener(dae);
       mi.setActionCommand("-");

       arrows = new Panel(new GridLayout(2,1));
       arrows.add(pl);
       arrows.add(mi);
       p = new Panel(new BorderLayout());
       p.add(d, "Center");
       p.add(arrows, "East");
       date.add(p);

       // then the "Month" panel
       m = new Label();
       m.setAlignment(Label.CENTER);
       dae = new DateActionListener(Calendar.MONTH);

       pl = new ImageButton(up);
       pl.addActionListener(dae);
       pl.setActionCommand("+");

       mi = new ImageButton(down);
       mi.addActionListener(dae);
       mi.setActionCommand("-");

       arrows = new Panel(new GridLayout(2,1));
       arrows.add(pl);
       arrows.add(mi);
       p = new Panel(new BorderLayout());
       p.add(m, "Center");
       p.add(arrows, "East");
       date.add(p);

       // then the "Year" panel
       y = new Label();
       y.setAlignment(Label.CENTER);
       dae = new DateActionListener(Calendar.YEAR);

       pl = new ImageButton(up);
       pl.addActionListener(dae);
       pl.setActionCommand("+");

       mi = new ImageButton(down);
       mi.addActionListener(dae);
       mi.setActionCommand("-");

       arrows = new Panel(new GridLayout(2,1));
       arrows.add(pl);
View Full Code Here


      createDefaultItems(feeder);
      createSelectedItems();
      setSelectedItems(selected);

      //center
      waddItem = new ImageButton(left);
      waddItem.setActionCommand("add");
      waddItem.addActionListener(this);
      Panel paddItem = new Panel();
      paddItem.add(waddItem);

      wdelItem = new ImageButton(right);
      wdelItem.setActionCommand("del");
      wdelItem.addActionListener(this);   
      Panel pdelItem = new Panel();
      pdelItem.add(wdelItem, "Center");
View Full Code Here

TOP

Related Classes of org.w3c.tools.widgets.ImageButton

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.