@Override public double getAvailable(Dimension dimension) { for (AreaNode p = getParent(); p != null; p = p.getParent()) { if (p instanceof ReferenceArea) return p.getAvailable(dimension); } return super.getAvailable(dimension); }
public LineArea getLine() { for (AreaNode p = getParent(); p != null; p = p.getParent()) { if (p instanceof LineArea) return (LineArea) p; else if (p instanceof ReferenceArea) break; } return new LineArea(); }