236237238239240241242243244245246
String s = getProperty(key); if (s == null) return def; if (s.equals("null")) return null; String[] r = s.split(", "); return new Insets( Integer.parseInt(r[0]), Integer.parseInt(r[1]), Integer.parseInt(r[2]), Integer.parseInt(r[3]) );
114115116117118119120121122
public static final Insets getMargins(Insets insets, String orientation) { if (orientation.equals(PORTRAIT)) { return insets; } else { // turn page to right return new Insets(insets.left, insets.bottom, insets.right, insets.top); } }
53545556575859
return hashCode; } @Override public Object clone() { return new Insets(top, left, bottom, right); }
6263646566676869707172
public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof Insets) { Insets i = (Insets) o; return ((i.left == left) && (i.bottom == bottom) && (i.right == right) && (i.top == top)); } return false; }