1 14 package org.wings.event; 15 16 import org.wings.SInternalFrame; 17 18 import java.awt.*; 19 20 27 public class SInternalFrameEvent extends AWTEvent { 28 31 public static final int INTERNAL_FRAME_FIRST = 12000; 32 33 37 public static final int INTERNAL_FRAME_OPENED = INTERNAL_FRAME_FIRST; 38 39 44 public static final int INTERNAL_FRAME_CLOSED = 1 + INTERNAL_FRAME_FIRST; 45 46 50 public static final int INTERNAL_FRAME_ICONIFIED = 2 + INTERNAL_FRAME_FIRST; 51 52 56 public static final int INTERNAL_FRAME_DEICONIFIED = 3 + INTERNAL_FRAME_FIRST; 57 58 62 public static final int INTERNAL_FRAME_MAXIMIZED = 4 + INTERNAL_FRAME_FIRST; 63 64 68 public static final int INTERNAL_FRAME_UNMAXIMIZED = 5 + INTERNAL_FRAME_FIRST; 69 70 73 public static final int INTERNAL_FRAME_LAST = INTERNAL_FRAME_UNMAXIMIZED; 74 75 81 public SInternalFrameEvent(SInternalFrame source, int id) { 82 super(source, id); 83 } 84 85 91 public String paramString() { 92 String typeStr; 93 switch (id) { 94 case INTERNAL_FRAME_OPENED: 95 typeStr = "INTERNAL_FRAME_OPENED"; 96 break; 97 case INTERNAL_FRAME_CLOSED: 98 typeStr = "INTERNAL_FRAME_CLOSED"; 99 break; 100 case INTERNAL_FRAME_ICONIFIED: 101 typeStr = "INTERNAL_FRAME_ICONIFIED"; 102 break; 103 case INTERNAL_FRAME_DEICONIFIED: 104 typeStr = "INTERNAL_FRAME_DEICONIFIED"; 105 break; 106 case INTERNAL_FRAME_MAXIMIZED: 107 typeStr = "INTERNAL_FRAME_MAXIMIZED"; 108 break; 109 case INTERNAL_FRAME_UNMAXIMIZED: 110 typeStr = "INTERNAL_FRAME_UNMAXIMIZED"; 111 break; 112 default: 113 typeStr = "unknown type"; 114 } 115 return typeStr; 116 } 117 118 119 125 public SInternalFrame getInternalFrame() { 126 return (source instanceof SInternalFrame) ? (SInternalFrame) source : null; 127 } 128 129 } 130 131 132 | Popular Tags |