1 19 20 package org.netbeans.core.windows.view.ui.slides; 21 22 import java.awt.event.ActionEvent ; 23 import java.awt.event.MouseEvent ; 24 25 29 public final class SlideBarActionEvent extends ActionEvent { 30 31 private final MouseEvent mouseEvent; 32 33 private final int tabIndex; 34 35 private final SlideOperation slideOperation; 36 37 public SlideBarActionEvent(Object source, String command, MouseEvent mouseEvent, int tabIndex) { 38 this(source, command, null, mouseEvent, tabIndex); 39 } 40 41 public SlideBarActionEvent(Object source, String command, SlideOperation slideOperation) { 42 this(source, command, slideOperation, null, -1); 43 } 44 45 public SlideBarActionEvent(Object source, String command, SlideOperation operation, 46 MouseEvent mouseEvent, int tabIndex) { 47 super(source, ActionEvent.ACTION_PERFORMED, command); 48 this.tabIndex = tabIndex; 49 this.mouseEvent = mouseEvent; 50 this.slideOperation = operation; 51 } 52 53 54 public MouseEvent getMouseEvent() { 55 return mouseEvent; 56 } 57 58 public int getTabIndex() { 59 return tabIndex; 60 } 61 62 public SlideOperation getSlideOperation() { 63 return slideOperation; 64 } 65 66 public String toString() { 67 StringBuffer sb = new StringBuffer ("SlideBarActionEvent:"); sb.append ("Tab " + tabIndex + " " + getActionCommand()); return sb.toString(); 70 } 71 72 } 73 | Popular Tags |