Example #1
0
  public void enable() {
    this.getShape().setStartPosition(null);

    LayerList layers = this.getWwd().getModel().getLayers();

    if (!layers.contains(this.getLayer())) layers.add(this.getLayer());

    if (!this.getLayer().isEnabled()) this.getLayer().setEnabled(true);

    this.setArmed(true);

    this.getWwd().addRenderingListener(this);
    this.getWwd().addSelectListener(this);
    this.getWwd().getInputHandler().addMouseListener(this);
    this.getWwd().getInputHandler().addMouseMotionListener(this);

    this.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
  }