Warning: session_start(): open(/var/lib/php/sessions/sess_ploud9ssesano6ltt71uoqdg50, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sclass JFastLogView_noWrap extends JComponent implements Scrollable {
LS lines = syncList();
public Dimension getPreferredScrollableViewportSize() { ret getPreferredSize(); }
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { return 20; }
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
ret (direction == SwingConstants.HORIZONTAL ? visibleRect.width : visibleRect.height)*5/6;
}
public bool getScrollableTracksViewportWidth() { false; }
public bool getScrollableTracksViewportHeight() { false; }
public void paint(Graphics g) {
int w = getWidth(), h = getHeight();
g.setColor(getBackground());
g.fillRect(0, 0, w, h);
g.setColor(getForeground());
FontMetrics fm = getFontMetrics(getFont());
int fh = fm.getHeight();
Rectangle clip = g.getClipBounds();
int start, end;
if (clip == null) { start = 0; end = l(lines); }
else {
start = max(0, clip.y/fh);
end = min(l(lines), idiv_ceil(clip.y+clip.height, fh));
}
printVars(+start, +end);
int y = fm.getAscent()+start*fh;
for (int i = start; i < end; i++) {
S s = get(lines, i);
g.drawString(s, 0, y);
y += fh;
}
}
public Dimension getPreferredSize() {
FontMetrics fm = getFontMetrics(getFont());
int fh = fm.getHeight();
int w = 0;
for i over lines: {
S s = get(lines, i);
w = max(w, fm.stringWidth(s));
}
ret new Dimension(w, fh*l(lines));
}
// API
void setLines(Collection lines) {
this.lines = asSyncList(lines);
_revalidate(this);
}
}