org.wings.plaf.css.SpinnerCG Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2000,2005 wingS development team.
*
* This file is part of wingS (http://wingsframework.org).
*
* wingS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* Please see COPYING for the complete licence.
*/
package org.wings.plaf.css;
import java.io.IOException;
import org.wings.SSpinner;
import org.wings.SComponent;
import org.wings.SResourceIcon;
import org.wings.SIcon;
import org.wings.io.Device;
public class SpinnerCG extends AbstractComponentCG implements org.wings.plaf.SpinnerCG {
private static final SResourceIcon DEFAULT_ICON_NEXT = new SResourceIcon("org/wings/icons/SpinnerNext.gif");
private static final SResourceIcon DEFAULT_ICON_PREV = new SResourceIcon("org/wings/icons/SpinnerPrev.gif");
private static final long serialVersionUID = 1L;
private SIcon nextIcon = DEFAULT_ICON_NEXT;
private SIcon prevIcon = DEFAULT_ICON_PREV;
@Override
public void installCG(SComponent component) {
super.installCG(component);
}
@Override
public void uninstallCG(SComponent component) {
}
@Override
public void writeInternal(final Device device, final SComponent component)
throws IOException {
final SSpinner spinner = (SSpinner) component;
device.print( "\n\n" );
spinner.getEditor().write( device );
device.print( "\n \n" );
device.print( "\n" );
device.print( "\n" );
device.print( "
\n" );
}
public SIcon getNextIcon() {
return nextIcon;
}
public void setNextIcon(SIcon nextIcon) {
this.nextIcon = nextIcon;
}
public SIcon getPrevIcon() {
return prevIcon;
}
public void setPrevIcon(SIcon prevIcon) {
this.prevIcon = prevIcon;
}
}