use of org.develnext.jphp.swing.XYLayout in project jphp by jphp-compiler.
the class UIElement method __setAnchors.
@Signature(@Arg("value"))
protected Memory __setAnchors(Environment env, Memory... args) {
ComponentProperties data = SwingExtension.getProperties(getComponent());
data.anchors.clear();
if (args[0].isArray()) {
ForeachIterator iterator = args[0].getNewIterator(env, false, false);
while (iterator.next()) {
Anchor anchor = Anchor.valueOf(iterator.getValue().toString().toUpperCase());
if (anchor == null)
env.exception(env.trace(), "Invalid anchor value - " + iterator.getValue());
data.anchors.add(anchor);
}
} else {
Anchor anchor = Anchor.valueOf(args[0].toString().toUpperCase());
if (anchor == null)
env.exception(env.trace(), "Invalid anchor value - " + args[0]);
}
if (getComponent().getParent() != null) {
LayoutManager layout = getComponent().getParent().getLayout();
if (!(layout instanceof XYLayout))
env.exception(env.trace(), "Layout must be an instance of XYLayout");
}
return Memory.NULL;
}
use of org.develnext.jphp.swing.XYLayout in project jphp by jphp-compiler.
the class UIDesktopPanel method onInit.
@Override
protected void onInit(Environment env, Memory... args) {
pane = new JDesktopPane();
pane.setLayout(new XYLayout());
pane.setDragMode(JDesktopPane.LIVE_DRAG_MODE);
}
use of org.develnext.jphp.swing.XYLayout in project jphp by jphp-compiler.
the class UIForm method onInit.
@Override
protected void onInit(Environment env, Memory... args) {
frame = new JFrameX();
frame.setLayout(new XYLayout());
}
Aggregations