use of jmri.jmrit.display.PositionablePopupUtil in project JMRI by JMRI.
the class DecoratorPanel method doPopupUtility.
private void doPopupUtility(String type, int which, PositionableLabel sample, PositionablePopupUtil ut, boolean editText) {
PositionablePopupUtil util = sample.getPopupUtility();
util.setJustification(ut.getJustification());
util.setHorizontalAlignment(ut.getJustification());
util.setFixedWidth(ut.getFixedWidth());
util.setFixedHeight(ut.getFixedHeight());
util.setMargin(ut.getMargin());
util.setBorderSize(ut.getBorderSize());
util.setBorderColor(ut.getBorderColor());
util.setFont(util.getFont().deriveFont(ut.getFontStyle()));
util.setFontSize(ut.getFontSize());
util.setOrientation(ut.getOrientation());
sample.updateSize();
_sample.put(type, sample);
this.add(makeTextPanel(type, sample, which, editText));
_samplePanel.add(sample);
_samplePanel.add(Box.createHorizontalStrut(STRUT));
}
Aggregations