1 19 20 21 package org.netbeans.core.windows; 22 23 import org.netbeans.core.windows.view.View; 24 25 31 final class ViewRequest { 32 33 34 public final Object source; 35 36 public final int type; 37 38 public final Object oldValue; 39 40 public final Object newValue; 41 42 43 44 public ViewRequest(Object source, int type, Object oldValue, Object newValue) { 45 this.source = source; 46 this.type = type; 47 this.oldValue = oldValue; 48 this.newValue = newValue; 49 } 50 51 public String toString() { 52 StringBuilder result = new StringBuilder (); 53 result.append ("ViewRequest@"); 54 result.append (System.identityHashCode(this)); 55 result.append (" [TYPE="); 56 String tp; 57 switch (type) { 58 case View.CHANGE_ACTIVE_MODE_CHANGED : 59 tp = "CHANGE_ACTIVE_MODE_CHANGED"; break; 61 case View.CHANGE_EDITOR_AREA_BOUNDS_CHANGED : 62 tp = "CHANGE_EDITOR_AREA_BOUNDS_CHANGED"; break; 64 case View.CHANGE_EDITOR_AREA_CONSTRAINTS_CHANGED : 65 tp = "CHANGE_EDITOR_AREA_CONSTRAINTS_CHANGED"; break; 67 case View.CHANGE_EDITOR_AREA_STATE_CHANGED : 68 tp = "CHANGE_EDITOR_AREA_STATE_CHANGED"; break; 70 case View.CHANGE_EDITOR_AREA_FRAME_STATE_CHANGED : 71 tp = "CHANGE_EDITOR_AREA_FRAME_STATE_CHANGED"; break; 73 case View.CHANGE_MAIN_WINDOW_BOUNDS_JOINED_CHANGED : 74 tp = "CHANGE_MAIN_WINDOW_BOUNDS_JOINED_CHANGED"; break; 76 case View.CHANGE_MAIN_WINDOW_BOUNDS_SEPARATED_CHANGED : 77 tp = "CHANGE_MAIN_WINDOW_BOUNDS_SEPARATED_CHANGED"; break; 79 case View.CHANGE_MAIN_WINDOW_FRAME_STATE_JOINED_CHANGED : 80 tp = "CHANGE_MAIN_WINDOW_FRAME_STATE_JOINED_CHANGED"; break; 82 case View.CHANGE_MAIN_WINDOW_FRAME_STATE_SEPARATED_CHANGED : 83 tp = "CHANGE_MAIN_WINDOW_FRAME_STATE_SEPARATED_CHANGED"; break; 85 case View.CHANGE_MAXIMIZED_MODE_CHANGED : 86 tp = "CHANGE_MAXIMIZED_MODE_CHANGED"; break; 88 case View.CHANGE_MODE_SELECTED_TOPCOMPONENT_CHANGED : 89 tp = "CHANGE_MODE_SELECTED_TOPCOMPONENT_CHANGED"; break; 91 case View.CHANGE_MODE_BOUNDS_CHANGED : 92 tp = "CHANGE_MODE_BOUNDS_CHANGED"; break; 94 case View.CHANGE_MODE_CONSTRAINTS_CHANGED : 95 tp = "CHANGE_MODE_CONSTRAINTS_CHANGED"; break; 97 case View.CHANGE_MODE_FRAME_STATE_CHANGED : 98 tp = "CHANGE_MODE_FRAME_STATE_CHANGED"; break; 100 case View.CHANGE_TOOLBAR_CONFIGURATION_CHANGED : 101 tp = "CHANGE_TOOLBAR_CONFIGURATION_CHANGED"; break; 103 case View.CHANGE_TOPCOMPONENT_ICON_CHANGED : 104 tp = "CHANGE_TOPCOMPONENT_ICON_CHANGED"; break; 106 case View.CHANGE_TOPCOMPONENT_DISPLAY_NAME_CHANGED : 107 tp = "CHANGE_TOPCOMPONENT_DISPLAY_NAME_CHANGED"; break; 109 case View.CHANGE_TOPCOMPONENT_DISPLAY_NAME_ANNOTATION_CHANGED : 110 tp = "CHANGE_TOPCOMPONENT_DISPLAY_NAME_ANNOTATION_CHANGED"; break; 112 case View.CHANGE_TOPCOMPONENT_TOOLTIP_CHANGED : 113 tp = "CHANGE_TOPCOMPONENT_TOOLTIP_CHANGED"; break; 115 case View.CHANGE_TOPCOMPONENT_ACTIVATED : 116 tp = "CHANGE_TOPCOMPONENT_ACTIVATED"; break; 118 case View.CHANGE_DND_PERFORMED : 119 tp = "CHANGE_DND_PERFORMED"; break; 121 case View.CHANGE_UI_UPDATE : 122 tp = "CHANGE_UI_UPDATE"; break; 124 case View.TOPCOMPONENT_REQUEST_ATTENTION : 125 tp = "TOPCOMPONENT_REQUEST_ATTENTION"; break; 127 case View.TOPCOMPONENT_CANCEL_REQUEST_ATTENTION : 128 tp = "TOPCOMPONENT_CANCEL_REQUEST_ATTENTION"; break; 130 default : 131 tp = "UNKNOWN"; 132 break; 133 } 134 result.append (tp).append ("] [oldValue:").append(oldValue) 135 .append("] [newValue:").append(newValue) 136 .append("] [source:").append(source).append(']'); 137 return result.toString(); 138 } 139 140 } 141 142 | Popular Tags |