1 41 42 package org.jfree.chart.axis; 43 44 import java.util.List ; 45 46 import org.jfree.ui.RectangleEdge; 47 48 53 public class AxisCollection { 54 55 56 private List axesAtTop; 57 58 59 private List axesAtBottom; 60 61 62 private List axesAtLeft; 63 64 65 private List axesAtRight; 66 67 70 public AxisCollection() { 71 this.axesAtTop = new java.util.ArrayList (); 72 this.axesAtBottom = new java.util.ArrayList (); 73 this.axesAtLeft = new java.util.ArrayList (); 74 this.axesAtRight = new java.util.ArrayList (); 75 } 76 77 83 public List getAxesAtTop() { 84 return this.axesAtTop; 85 } 86 87 93 public List getAxesAtBottom() { 94 return this.axesAtBottom; 95 } 96 97 103 public List getAxesAtLeft() { 104 return this.axesAtLeft; 105 } 106 107 113 public List getAxesAtRight() { 114 return this.axesAtRight; 115 } 116 117 124 public void add(Axis axis, RectangleEdge edge) { 125 if (axis == null) { 126 throw new IllegalArgumentException ("Null 'axis' argument."); 127 } 128 if (edge == null) { 129 throw new IllegalArgumentException ("Null 'edge' argument."); 130 } 131 if (edge == RectangleEdge.TOP) { 132 this.axesAtTop.add(axis); 133 } 134 else if (edge == RectangleEdge.BOTTOM) { 135 this.axesAtBottom.add(axis); 136 } 137 else if (edge == RectangleEdge.LEFT) { 138 this.axesAtLeft.add(axis); 139 } 140 else if (edge == RectangleEdge.RIGHT) { 141 this.axesAtRight.add(axis); 142 } 143 } 144 145 } 146 | Popular Tags |