Dépôt officiel du code source de l'ERP OpenConcerto
/trunk/jOpenCalendar/src/org/jopencalendar/ui/MultipleDayView.java |
---|
522,23 → 522,24 |
} |
public void setZoom(int zIndex) { |
public final void setZoom(int zIndex) { |
if (zIndex >= 0) { |
int rh = 22 + zIndex * 22; |
this.rowHeight = rh; |
// update size |
final int w = this.getSize().width; |
final int h = getPreferredSize().height; |
setSize(new Dimension(w, h)); |
validate(); |
repaint(); |
int rh = (1 + zIndex) * 22; |
setRowHeight(rh); |
} |
} |
public final int getZoom() { |
return (this.rowHeight / 22) - 1; |
} |
private void zoom(int v) { |
if (rowHeight < 200 && rowHeight > 60) { |
rowHeight += v; |
setRowHeight(this.rowHeight + v); |
} |
public final void setRowHeight(final int v) { |
if (this.rowHeight != v && v < 200 && v > 20) { |
this.rowHeight = v; |
// update size |
final int w = this.getSize().width; |
final int h = getPreferredSize().height; |
545,10 → 546,13 |
setSize(new Dimension(w, h)); |
validate(); |
repaint(); |
this.firePropertyChange("rowHeight", null, v); |
this.firePropertyChange("zoom", null, getZoom()); |
} |
} |
public int getRowHeight() { |
// how many pixels for one hour |
public final int getRowHeight() { |
return this.rowHeight; |
} |