use of main.swing.generic.components.VisualComponent in project Eidolons by IDemiurge.
the class MigMaster method processConstraints.
public static String processConstraints(G_Panel panel, Component comp, String constraints) {
int height = (int) comp.getPreferredSize().getHeight();
int width = (int) comp.getPreferredSize().getWidth();
int container_height = (int) panel.getPreferredSize().getHeight();
int container_width = (int) panel.getPreferredSize().getWidth();
if (panel.getVisuals() != null) {
if (container_height == 0) {
container_height = panel.getVisuals().getHeight();
}
if (container_width == 0) {
container_width = panel.getVisuals().getWidth();
}
}
if (comp instanceof VisualComponent) {
VISUALS visuals = ((VisualComponent) comp).getVisuals();
if (visuals != null) {
if (height == 0) {
height = visuals.getHeight();
}
if (width == 0) {
width = visuals.getWidth();
}
}
}
return process(constraints, height, width, container_height, container_width);
}
Aggregations