Ejemplo n.º 1
0
 @Override
 public void changeBackgroundColor(Color newColor) {
   LayoutDocument doc = lSystem.getDocument();
   Color old = lSystem.getDocument().getBackground();
   ChangeBackgroundUndoableEdit edit = new ChangeBackgroundUndoableEdit(doc, old, newColor);
   GlobalUndoManager.getManager().undoableEditHappened(new UndoableEditEvent(doc, edit));
   lSystem.getDocument().setBackground(newColor);
   addSavable();
 }
Ejemplo n.º 2
0
  ImmutableLayoutScene(DataObject obj, LayoutLSystem lSystem) {
    super();
    this.projectPath =
        FileOwnerQuery.getOwner(obj.getPrimaryFile()).getProjectDirectory().getPath();
    LayoutLSystem lSclone = new LayoutLSystem(lSystem);
    LayoutDocument ld = lSclone.getDocument();

    // paper layer
    this.paperWidget = new PaperWidget(this, ld);
    paperWidget.drawShadow = false;
    paperLayer.addChild(paperWidget);

    LayerController layerController = LayerFactory.createLayer(this, lSclone.getLayers());
    // main layer, where sublayout widgets will be added
    addChild(layerController.getRootWidget());

    for (Object o : getObjects()) {
      Widget w = findWidget(o);
      if (w instanceof SubLayoutWidget) {
        SubLayoutWidget slw = (SubLayoutWidget) w;
        slw.showEmptySquares(false);
      }
    }
  }
Ejemplo n.º 3
0
 @Override
 public Color getBackgroundColor() {
   return lSystem.getDocument().getBackground();
 }