Ejemplo n.º 1
0
  @Override
  public void actionPerformed(ActionEvent ae) {
    if (ae.getAction() != null)
      if (ae.getAction().equals("tree_node_clicked"))
        ent = (Entity) ((TreeDragNodeEntity) ae.getSource()).getLastClickedNode().getData(1);

    createEntityList();
    createPropertyMenu();
  }
Ejemplo n.º 2
0
 @SuppressWarnings("unchecked")
 @Override
 public void actionPerformed(ActionEvent e) {
   if (((Block<Integer>) e.getSource()).getMouseButton() == 0) {
     ((Block<Integer>) e.getSource()).setColor(current_color);
     fireActionEvent();
   } else if (((Block<Integer>) e.getSource()).getMouseButton() == 1) {
     ((Block<Integer>) e.getSource()).setColor(null);
     fireActionEvent();
   } else if (((Block<Integer>) e.getSource()).getMouseWheel() == 1) {
     fireActionEvent("mouseup");
   } else if (((Block<Integer>) e.getSource()).getMouseWheel() == -1) {
     fireActionEvent("mousedown");
   } else {
     System.out.println(
         "GridWindow doesn't handle button: "
             + ((Block<Integer>) e.getSource()).getMouseButton()
             + ", yet. Fix it dummy!");
   }
 }