Examples of Margin


Examples of simplesheet.style.Margin

    public CellBorderPanel(Style style, TableListener tableListener) {
        this.style = style;
        this.tableListener = tableListener;
        initComponents();

        Margin insets = style.getMargin();
        if(insets != null) {
            topInset.setText(String.valueOf(insets.top));
            bottomInset.setText(String.valueOf(insets.bottom));
            leftInset.setText(String.valueOf(insets.left));
            rightInset.setText(String.valueOf(insets.right));
View Full Code Here

Examples of simplesheet.style.Margin

                    value = Integer.parseInt(txt);
                } catch (NumberFormatException ex) {
                    //do nothing
                }
            }
            Margin m = style.getMargin();
            if(m == null) {
                m = new Margin(0, 0, 0, 0);
            }
            if(field == topInset) {
                m = new Margin(m.left, m.right, value, m.bottom);
            } else if(field == bottomInset) {
                m = new Margin(m.left, m.right, m.top, value);
            } else if(field == leftInset) {
                m = new Margin(value, m.right, m.top, m.bottom);
            } else if(field == rightInset) {
                m = new Margin(m.left, value, m.top, m.bottom);
            }
            if(m.bottom == 0
                    && m.left == 0
                    && m.right == 0
                    && m.top == 0) {
View Full Code Here

Examples of simplesheet.style.Margin

        String textVAlignStr = XML.getStringAttribute(element, ATTR_TEXTVALIGN, null, false);
        if(textVAlignStr != null) {
             style.setTextVAlign(TextVAlign.valueOf(textVAlignStr));
        }

        Margin m = new Margin(loadMargin(element, TAG_TOP), loadMargin(element, TAG_LEFT),
                loadMargin(element, TAG_RIGHT), loadMargin(element, TAG_BOTTOM));
        if(!m.isEmpty()) {
            style.setMargin(m);
        }

        CellBorder b = new CellBorder(loadBorder(element, TAG_TOP), loadBorder(element, TAG_LEFT),
                loadBorder(element, TAG_RIGHT), loadBorder(element, TAG_BOTTOM));
View Full Code Here

Examples of simplesheet.style.Margin

        }
        if(style.getTextVAlign() != TextVAlign.undefined) {
            root.setAttribute(ATTR_TEXTVALIGN, style.getTextVAlign().name());
        }

        Margin margin = style.getMargin();
        CellBorder cellBorder = style.getBorder();
        saveBorder(root, TAG_TOP, margin == null ? 0:margin.top,
                cellBorder == null ? null: cellBorder.top);
        saveBorder(root, TAG_LEFT, margin == null ? 0:margin.left,
                cellBorder == null ? null: cellBorder.left);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.