Java 类com.intellij.uiDesigner.lw.LwSplitPane 实例源码

项目:intellij-ce-playground    文件:SplitPaneLayoutCodeGenerator.java   
public void generateComponentLayout(final LwComponent lwComponent,
                                    final GeneratorAdapter generator,
                                    final int componentLocal,
                                    final int parentLocal) {
  generator.loadLocal(parentLocal);
  generator.loadLocal(componentLocal);
  if (LwSplitPane.POSITION_LEFT.equals(lwComponent.getCustomLayoutConstraints())) {
    generator.invokeVirtual(mySplitPaneType, mySetLeftMethod);
  }
  else {
    generator.invokeVirtual(mySplitPaneType, mySetRightMethod);
  }
}
项目:intellij-ce-playground    文件:SplitPaneLayoutSourceGenerator.java   
public void generateComponentLayout(final LwComponent component,
                                    final FormSourceCodeGenerator generator,
                                    final String variable,
                                    final String parentVariable) {
  @NonNls final String methodName =
    LwSplitPane.POSITION_LEFT.equals(component.getCustomLayoutConstraints()) ?
    "setLeftComponent" :
    "setRightComponent";

  generator.startMethodCall(parentVariable, methodName);
  generator.pushVar(variable);
  generator.endMethod();
}
项目:intellij-ce-playground    文件:RadSplitPane.java   
public void writeChildConstraints(final XmlWriter writer, final RadComponent child) {
  writer.startElement("splitpane");
  try {
    final String position = (String)child.getCustomLayoutConstraints();
    if (!LwSplitPane.POSITION_LEFT.equals(position) && !LwSplitPane.POSITION_RIGHT.equals(position)) {
      throw new IllegalStateException("invalid position: " + position);
    }
    writer.addAttribute("position", position);
  }
  finally {
    writer.endElement();
  }
}
项目:intellij-ce-playground    文件:RadSplitPane.java   
public void addComponentToContainer(final RadContainer container, final RadComponent component, final int index) {
  final JSplitPane splitPane = (JSplitPane) container.getDelegee();
  final JComponent delegee = component.getDelegee();
  if (LwSplitPane.POSITION_LEFT.equals(component.getCustomLayoutConstraints())) {
    splitPane.setLeftComponent(delegee);
  }
  else if (LwSplitPane.POSITION_RIGHT.equals(component.getCustomLayoutConstraints())) {
    splitPane.setRightComponent(delegee);
  }
  else {
    throw new IllegalStateException("invalid layout constraints on component added to RadSplitPane");
  }
}
项目:intellij-ce-playground    文件:RadSplitPane.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  components[0].setCustomLayoutConstraints(myLeft ? LwSplitPane.POSITION_LEFT : LwSplitPane.POSITION_RIGHT);
  addComponent(components[0]);
}
项目:tools-idea    文件:SplitPaneLayoutCodeGenerator.java   
public void generateComponentLayout(final LwComponent lwComponent,
                                    final GeneratorAdapter generator,
                                    final int componentLocal,
                                    final int parentLocal) {
  generator.loadLocal(parentLocal);
  generator.loadLocal(componentLocal);
  if (LwSplitPane.POSITION_LEFT.equals(lwComponent.getCustomLayoutConstraints())) {
    generator.invokeVirtual(mySplitPaneType, mySetLeftMethod);
  }
  else {
    generator.invokeVirtual(mySplitPaneType, mySetRightMethod);
  }
}
项目:tools-idea    文件:SplitPaneLayoutSourceGenerator.java   
public void generateComponentLayout(final LwComponent component,
                                    final FormSourceCodeGenerator generator,
                                    final String variable,
                                    final String parentVariable) {
  @NonNls final String methodName =
    LwSplitPane.POSITION_LEFT.equals(component.getCustomLayoutConstraints()) ?
    "setLeftComponent" :
    "setRightComponent";

  generator.startMethodCall(parentVariable, methodName);
  generator.pushVar(variable);
  generator.endMethod();
}
项目:tools-idea    文件:RadSplitPane.java   
public void writeChildConstraints(final XmlWriter writer, final RadComponent child) {
  writer.startElement("splitpane");
  try {
    final String position = (String)child.getCustomLayoutConstraints();
    if (!LwSplitPane.POSITION_LEFT.equals(position) && !LwSplitPane.POSITION_RIGHT.equals(position)) {
      throw new IllegalStateException("invalid position: " + position);
    }
    writer.addAttribute("position", position);
  }
  finally {
    writer.endElement();
  }
}
项目:tools-idea    文件:RadSplitPane.java   
public void addComponentToContainer(final RadContainer container, final RadComponent component, final int index) {
  final JSplitPane splitPane = (JSplitPane) container.getDelegee();
  final JComponent delegee = component.getDelegee();
  if (LwSplitPane.POSITION_LEFT.equals(component.getCustomLayoutConstraints())) {
    splitPane.setLeftComponent(delegee);
  }
  else if (LwSplitPane.POSITION_RIGHT.equals(component.getCustomLayoutConstraints())) {
    splitPane.setRightComponent(delegee);
  }
  else {
    throw new IllegalStateException("invalid layout constraints on component added to RadSplitPane");
  }
}
项目:tools-idea    文件:RadSplitPane.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  components[0].setCustomLayoutConstraints(myLeft ? LwSplitPane.POSITION_LEFT : LwSplitPane.POSITION_RIGHT);
  addComponent(components[0]);
}
项目:consulo-ui-designer    文件:SplitPaneLayoutSourceGenerator.java   
public void generateComponentLayout(final LwComponent component,
                                    final FormSourceCodeGenerator generator,
                                    final String variable,
                                    final String parentVariable) {
  @NonNls final String methodName =
    LwSplitPane.POSITION_LEFT.equals(component.getCustomLayoutConstraints()) ?
    "setLeftComponent" :
    "setRightComponent";

  generator.startMethodCall(parentVariable, methodName);
  generator.pushVar(variable);
  generator.endMethod();
}
项目:consulo-ui-designer    文件:RadSplitPane.java   
public void writeChildConstraints(final XmlWriter writer, final RadComponent child) {
  writer.startElement("splitpane");
  try {
    final String position = (String)child.getCustomLayoutConstraints();
    if (!LwSplitPane.POSITION_LEFT.equals(position) && !LwSplitPane.POSITION_RIGHT.equals(position)) {
      throw new IllegalStateException("invalid position: " + position);
    }
    writer.addAttribute("position", position);
  }
  finally {
    writer.endElement();
  }
}
项目:consulo-ui-designer    文件:RadSplitPane.java   
public void addComponentToContainer(final RadContainer container, final RadComponent component, final int index) {
  final JSplitPane splitPane = (JSplitPane) container.getDelegee();
  final JComponent delegee = component.getDelegee();
  if (LwSplitPane.POSITION_LEFT.equals(component.getCustomLayoutConstraints())) {
    splitPane.setLeftComponent(delegee);
  }
  else if (LwSplitPane.POSITION_RIGHT.equals(component.getCustomLayoutConstraints())) {
    splitPane.setRightComponent(delegee);
  }
  else {
    throw new IllegalStateException("invalid layout constraints on component added to RadSplitPane");
  }
}
项目:consulo-ui-designer    文件:RadSplitPane.java   
public void processDrop(GuiEditor editor,
                        RadComponent[] components,
                        GridConstraints[] constraintsToAdjust,
                        ComponentDragObject dragObject) {
  components[0].setCustomLayoutConstraints(myLeft ? LwSplitPane.POSITION_LEFT : LwSplitPane.POSITION_RIGHT);
  addComponent(components[0]);
}
项目:intellij-ce-playground    文件:RadSplitPane.java   
@Override
protected void importSnapshotComponent(final SnapshotContext context, final JComponent component) {
  JSplitPane splitPane = (JSplitPane) component;
  importSideComponent(splitPane.getLeftComponent(), context, LwSplitPane.POSITION_LEFT);
  importSideComponent(splitPane.getRightComponent(), context, LwSplitPane.POSITION_RIGHT);
}
项目:tools-idea    文件:RadSplitPane.java   
@Override
protected void importSnapshotComponent(final SnapshotContext context, final JComponent component) {
  JSplitPane splitPane = (JSplitPane) component;
  importSideComponent(splitPane.getLeftComponent(), context, LwSplitPane.POSITION_LEFT);
  importSideComponent(splitPane.getRightComponent(), context, LwSplitPane.POSITION_RIGHT);
}
项目:consulo-ui-designer    文件:RadSplitPane.java   
@Override
protected void importSnapshotComponent(final SnapshotContext context, final JComponent component) {
  JSplitPane splitPane = (JSplitPane) component;
  importSideComponent(splitPane.getLeftComponent(), context, LwSplitPane.POSITION_LEFT);
  importSideComponent(splitPane.getRightComponent(), context, LwSplitPane.POSITION_RIGHT);
}