1 19 20 package org.netbeans.modules.form.layoutsupport; 21 22 import java.awt.*; 23 import java.beans.*; 24 import org.openide.nodes.*; 25 import org.netbeans.modules.form.codestructure.*; 26 27 43 44 public interface LayoutSupportDelegate { 45 46 47 final int RESIZE_UP = 1; 48 49 final int RESIZE_DOWN = 2; 50 51 final int RESIZE_LEFT = 4; 52 53 final int RESIZE_RIGHT = 8; 54 55 69 void initialize(LayoutSupportContext layoutContext, 70 LayoutManager lmInstance, 71 boolean fromCode) 72 throws Exception ; 73 74 80 Class getSupportedClass(); 81 82 89 boolean isDedicated(); 90 91 97 boolean checkEmptyContainer(Container cont); 98 99 105 boolean shouldHaveNode(); 106 107 111 String getDisplayName(); 112 113 120 Image getIcon(int type); 121 122 129 Node.PropertySet[] getPropertySets(); 130 131 142 Class getCustomizerClass(); 143 144 154 Component getSupportCustomizer(); 155 156 160 CodeGroup getLayoutCode(); 161 162 166 CodeGroup getComponentCode(int index); 167 168 172 CodeExpression getComponentCodeExpression(int index); 173 174 177 int getComponentCount(); 178 179 193 void acceptNewComponents(CodeExpression[] compExpressions, 194 LayoutConstraints[] constraints, 195 int index); 196 197 205 void acceptContainerLayoutChange(PropertyChangeEvent ev) 206 throws PropertyVetoException; 207 208 217 void acceptComponentLayoutChange(int index, PropertyChangeEvent ev) 218 throws PropertyVetoException; 219 220 229 void addComponents(CodeExpression[] compExpressions, 230 LayoutConstraints[] constraints, 231 int index); 232 233 236 void removeComponent(int index); 237 238 240 void removeAll(); 241 242 251 boolean isLayoutChanged(Container defaultContainer, 252 Container defaultContainerDelegate); 253 254 258 LayoutConstraints getConstraints(int index); 259 260 272 void convertConstraints(LayoutConstraints[] previousConstraints, 273 LayoutConstraints[] currentConstraints, 274 Component[] components); 275 276 282 void setLayoutToContainer(Container container, 283 Container containerDelegate); 284 285 293 void addComponentsToContainer(Container container, 294 Container containerDelegate, 295 Component[] components, 296 int index); 297 298 306 boolean removeComponentFromContainer(Container container, 307 Container containerDelegate, 308 Component component); 309 310 317 boolean clearContainer(Container container, Container containerDelegate); 318 319 327 void processMouseClick(Point p, 328 Container container, 329 Container containerDelegate); 330 331 336 void selectComponent(int index); 337 338 347 void arrangeContainer(Container container, Container containerDelegate); 348 349 368 LayoutConstraints getNewConstraints(Container container, 369 Container containerDelegate, 370 Component component, 371 int index, 372 Point posInCont, 373 Point posInComp); 374 375 393 int getNewIndex(Container container, 394 Container containerDelegate, 395 Component component, 396 int index, 397 Point posInCont, 398 Point posInComp); 399 400 417 boolean paintDragFeedback(Container container, 418 Container containerDelegate, 419 Component component, 420 LayoutConstraints newConstraints, 421 int newIndex, 422 Graphics g); 423 424 434 int getResizableDirections(Container container, 435 Container containerDelegate, 436 Component component, 437 int index); 438 439 453 LayoutConstraints getResizedConstraints(Container container, 454 Container containerDelegate, 455 Component component, 456 int index, 457 Rectangle originalBounds, 458 Insets sizeChanges, 459 Point posInCont); 460 461 468 LayoutSupportDelegate cloneLayoutSupport(LayoutSupportContext targetContext, 469 CodeExpression[] targetComponents); 470 } 471 | Popular Tags |