利用fineui标准,开发设计器的 swing UI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
735 B

package com.tptj.tool.hg.fineui.swing.element.layout;
import com.tptj.tool.hg.fineui.swing.element.Element;
import com.tptj.tool.hg.fineui.swing.element.layout.impl.HorizontalLayout;
import javax.swing.*;
import java.awt.*;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021/11/1
**/
public class HorizontalType extends AbstractLayoutType{
@Override
public LayoutManager init() {
return new HorizontalLayout(element, FlowLayout.LEFT, 0, 0);
}
@Override
public void layout(Element child, int idx) {
Box box = new Box(BoxLayout.Y_AXIS);
box.add(child.getWrapper());
box.add(Box.createVerticalGlue());
element.getComponent().add(box);
}
}