use of eidolons.swing.components.panels.page.log.WrappedTextComp in project Eidolons by IDemiurge.
the class OptionDialog method createComponent.
@Override
public Component createComponent() {
panel = new G_Panel(getVisuals());
if (vertical) {
panel.setLayout(new MigLayout("fillx, flowy"));
} else {
panel.setLayout(new MigLayout("fillx"));
}
// panel.add(new TextComp(null, title), "");
for (Object o : options) {
addButton(o);
}
WrappedTextComp comp = new WrappedTextComp(null, true) {
protected int getDefaultFontSize() {
return 16;
}
public void wrapTextLines() {
super.wrapTextLines();
}
protected Dimension initDefaultSize() {
return getPanelSize();
}
public Dimension getPanelSize() {
return new Dimension(OptionDialog.this.getVisuals().getWidth() - 42, OptionDialog.this.getVisuals().getHeight() - VISUALS.BUTTON.getHeight() - 32);
}
};
comp.setPanelSize(new Dimension(getVisuals().getWidth() - 42, getVisuals().getHeight() - VISUALS.BUTTON.getHeight() - 32));
comp.setText(title);
comp.refresh();
panel.add(comp, "@pos center_x 75");
return panel;
}
Aggregations