use of com.ramussoft.reportgef.model.QBounds in project ramus by Vitaliy-Yakovchuk.
the class TableColumn method paint.
@Override
public void paint(Graphics2D g, Bounds bounds, Diagram diagram) {
QBounds qBounds = (QBounds) bounds;
columnHeader.paint(g, createHeaderBounds(qBounds), diagram);
g.translate(0, 35);
columnBody.paint(g, createBodyBounds(qBounds), diagram);
g.translate(0, -35);
g.draw(new Line2D.Double(0, 0, 0, height));
}
use of com.ramussoft.reportgef.model.QBounds in project ramus by Vitaliy-Yakovchuk.
the class TableColumn method createBodyBounds.
private Bounds createBodyBounds(QBounds mBounds) {
QBounds bounds = new QBounds();
Point2D p = mBounds.getLocation();
bounds.setLocation(new Point2D.Double(p.getX(), p.getY() + 25));
bounds.setBackground(columnBody.getDefaultBackground());
bounds.setFont(columnBody.getDefaultFont());
bounds.setFontColor(columnBody.getDefaultFontColor());
bounds.setForeground(columnBody.getDefaultForeground());
bounds.setSize(new Dimension2DImpl(mBounds.getSize().getWidth(), columnBody.getMinHeight()));
return bounds;
}
use of com.ramussoft.reportgef.model.QBounds in project ramus by Vitaliy-Yakovchuk.
the class TableColumn method createHeaderBounds.
private Bounds createHeaderBounds(QBounds mBounds) {
QBounds bounds = new QBounds();
Point2D p = mBounds.getLocation();
bounds.setLocation(new Point2D.Double(p.getX(), p.getY()));
bounds.setBackground(columnHeader.getDefaultBackground());
bounds.setFont(columnHeader.getDefaultFont());
bounds.setFontColor(columnHeader.getDefaultFontColor());
bounds.setForeground(columnHeader.getDefaultForeground());
bounds.setSize(new Dimension2DImpl(mBounds.getSize().getWidth(), columnHeader.getMinHeight()));
return bounds;
}
use of com.ramussoft.reportgef.model.QBounds in project ramus by Vitaliy-Yakovchuk.
the class GEFComponent method updateBounds.
public void updateBounds(Bounds[] bounds) {
for (int i = 0; i < bounds.length; i++) {
if (bounds[i] instanceof QBounds) {
QBounds qBounds = (QBounds) bounds[i];
Component component = diagram.getComponent(qBounds);
double width = qBounds.getSize().getWidth();
double height = qBounds.getSize().getHeight();
if (!component.isResizeableX()) {
width = component.getMinWidth();
}
if (!component.isResizeableY()) {
height = component.getMinHeight();
}
qBounds.getSize().setSize(width, height);
}
}
}
use of com.ramussoft.reportgef.model.QBounds in project ramus by Vitaliy-Yakovchuk.
the class XMLDiagram method getSize.
@Override
public Dimension2D getSize() {
double height = top * 2;
for (int i = 0; i < components.length; i++) {
XMLComponent component = (XMLComponent) components[i];
if (component.isY()) {
height += ((QBounds) bounds[i]).getSize().getHeight();
}
}
final Dimension2DImpl size = new Dimension2DImpl(width + LEFT * 2, height);
if (!size.equals(this.size)) {
this.size = size;
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (editor != null) {
editor.setPreferredSize(new Dimension((int) size.getWidth(), (int) size.getHeight()));
editor.revalidate();
editor.repaint();
}
}
});
}
return size;
}
Aggregations