Beispiel #1
0
  public BSBLineObjectView(BSBLineObject lineObj) {
    this.lineObj = lineObj;
    super.setBSBObject(this.lineObj);

    this.setLayout(new BorderLayout());
    this.add(lineCanvas, BorderLayout.CENTER);
    this.add(lineSelector, BorderLayout.SOUTH);

    lineCanvas.setLocked(lineObj.isLocked());

    lineSelector.setLineCanvas(lineCanvas);

    this.setBorder(new LineBorder(Color.GRAY));

    revalidate();

    setLineList(lineObj.getLines());

    this.setSize(
        lineObj.getCanvasWidth(),
        lineObj.getCanvasHeight() + lineSelector.getPreferredSize().height);

    repaint();

    lineObj.addPropertyChangeListener(this);
  }
Beispiel #2
0
 public void setLocked(boolean locked) {
   lineObj.setLocked(locked);
   lineCanvas.setLocked(locked);
 }