use of net.sourceforge.nattable.util.IClientAreaProvider in project translationstudio8 by heartsome.
the class ExportToExcelCommandHandler method setClientAreaToMaximum.
private void setClientAreaToMaximum() {
final Rectangle maxClientArea = new Rectangle(0, 0, gridLayer.getWidth(), gridLayer.getHeight());
gridLayer.setClientAreaProvider(new IClientAreaProvider() {
public Rectangle getClientArea() {
return maxClientArea;
}
});
gridLayer.doCommand(new PrintEntireGridCommand());
}
use of net.sourceforge.nattable.util.IClientAreaProvider in project translationstudio8 by heartsome.
the class NatTable method internalSetLayer.
private void internalSetLayer(ILayer layer) {
if (layer != null) {
this.underlyingLayer = layer;
underlyingLayer.setClientAreaProvider(new IClientAreaProvider() {
public Rectangle getClientArea() {
if (!isDisposed()) {
return NatTable.this.getClientArea();
} else
return new Rectangle(0, 0, 0, 0);
}
});
underlyingLayer.addLayerListener(this);
}
}
use of net.sourceforge.nattable.util.IClientAreaProvider in project translationstudio8 by heartsome.
the class CompositeLayer method setChildLayer.
// Child layer stuff
public void setChildLayer(String regionName, ILayer childLayer, final int layoutX, final int layoutY) {
if (childLayer == null) {
throw new IllegalArgumentException("Cannot set null child layer");
}
childLayerToRegionNameMap.put(childLayer, regionName);
childLayer.addLayerListener(this);
childLayerToLayoutCoordinateMap.put(childLayer, new LayoutCoordinate(layoutX, layoutY));
childLayerLayout[layoutX][layoutY] = childLayer;
childLayer.setClientAreaProvider(new IClientAreaProvider() {
public Rectangle getClientArea() {
return getChildClientArea(layoutX, layoutY);
}
});
}
use of net.sourceforge.nattable.util.IClientAreaProvider in project translationstudio8 by heartsome.
the class GridLayerPrinter method setGridLayerSize.
/**
* Expand the client area of the grid such that
* all the contents fit in the viewport. This ensures that when the grid prints
* we print the <i>entire</i> table.
* @param printer
*/
private void setGridLayerSize(PrinterData printerData) {
if (printerData.scope == PrinterData.SELECTION) {
gridLayer.setClientAreaProvider(originalClientAreaProvider);
return;
}
final Rectangle fullGridSize = getTotalGridArea();
gridLayer.setClientAreaProvider(new IClientAreaProvider() {
public Rectangle getClientArea() {
return fullGridSize;
}
});
gridLayer.doCommand(new PrintEntireGridCommand());
}
Aggregations