Examples of CloudModel


Examples of org.freeplane.features.cloud.CloudModel

        modeController.addAction(new CloudShapeAction(shape));
    }
  }

  public void setCloud(final NodeModel node, final boolean enable) {
    final CloudModel cloud = CloudModel.getModel(node);
    if ((cloud != null) == enable) {
      return;
    }
    final Color color = cloud != null ? cloud.getColor() : CloudController.getStandardColor();
    final ModeController modeController = Controller.getCurrentModeController();
    final IActor actor = new IActor() {
      public void act() {
        if (enable) {
          enable();
        }
        else {
          disable();
        }
      }

      private void disable() {
        final MapController mapController = modeController.getMapController();
        CloudModel.setModel(node, null);
        mapController.nodeChanged(node);
      }

      private void enable() {
        final CloudModel cloud = new CloudModel();
        cloud.setColor(color);
        final MapController mapController = modeController.getMapController();
        CloudModel.setModel(node, cloud);
        mapController.nodeChanged(node);
      }
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

      }
      copy(from, to);
    }

    public void copy(final NodeModel from, final NodeModel to) {
      final CloudModel fromStyle = (CloudModel) from.getExtension(CloudModel.class);
      if (fromStyle == null) {
        return;
      }
      final CloudModel toStyle = CloudModel.createModel(to);
      final Color color = fromStyle.getColor();
      if(color != null)
          toStyle.setColor(color);
      final Shape shape = fromStyle.getShape();
      if(shape != null)
          toStyle.setShape(shape);
    }
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

    public void remove(final Object key, final NodeModel from, final NodeModel which) {
      if (!key.equals(LogicalStyleKeys.NODE_STYLE)) {
        return;
      }
      final CloudModel whichStyle = (CloudModel) which.getExtension(CloudModel.class);
      if (whichStyle == null) {
        return;
      }
      final CloudModel fromStyle = (CloudModel) from.getExtension(CloudModel.class);
      if (fromStyle == null) {
        return;
      }
      from.removeExtension(fromStyle);
    }
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

  }

  @Override
  public void setSelected() {
    final NodeModel node = Controller.getCurrentModeController().getMapController().getSelectedNode();
    final CloudModel model = CloudModel.getModel(node);
    if (model != null) {
      if (actionShape.equals(model.getShape())) {
        setSelected(true);
        return;
      }
    }
    setSelected(false);
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

        getCloudController().setCloud(node, enable);
    }

    @Override
    public String getShape() {
        final CloudModel cloudModel = getCloudModel();
        return cloudModel == null ? null : cloudModel.getShape().name();
    }
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

        }
    }

    @Override
    public Color getColor() {
        final CloudModel cloudModel = getCloudModel();
        return cloudModel == null ? null : cloudModel.getColor();
    }
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

        mSetEdgeWidth.setValue(width != EdgeModel.DEFAULT_WIDTH);
        mEdgeWidth.setValue(Integer.toString(viewWidth));
      }
      {
        final CloudController cloudController = CloudController.getController();
        final CloudModel cloudModel = CloudModel.getModel(node);
        final Color viewCloudColor = cloudController.getColor(node);
        mSetCloud.setValue(cloudModel != null);
        mCloudColor.setColorValue(viewCloudColor);

        final CloudModel.Shape viewCloudShape = cloudController.getShape(node);
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

    }
    return getParentView().getBackgroundColor();
  }

  public Color getCloudColor() {
      final CloudModel cloudModel = getCloudModel();
    if(cloudModel != null){
      final Color cloudColor = cloudModel.getColor();
      return cloudColor;
    }
    return null;
    }
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

    }
    if (isContentVisible()) {
      if (byChildren) {
        final ModeController modeController = getMap().getModeController();
        final CloudController cloudController = CloudController.getController(modeController);
        final CloudModel cloud = cloudController.getCloud(getModel());
        if (cloud != null) {
          additionalDistanceForConvexHull += CloudView.getAdditionalHeigth(cloud, this) / 5;
        }
      }
      final int x = transX + getContent().getX() - getDeltaX();
View Full Code Here

Examples of org.freeplane.features.cloud.CloudModel

  private void paintCloud(final Graphics g) {
    if (!isContentVisible()) {
      return;
    }
    final CloudModel cloudModel = getCloudModel();
    if (cloudModel == null) {
      return;
    }
    final CloudView cloud = new CloudViewFactory().createCloudView(cloudModel, this);
    cloud.paint(g);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.