/** * Get the type of layout for this field layout. * * @return the layout type */ public String getLayoutType() { return getComponentModel().layoutType; }
/** * Allows layouts to have its ordered numbering start from an offset. Used with {@link #setOrdered(boolean)}. * * @return the ordered start offset. */ public int getOrderedOffset() { return getComponentModel().orderedOffset; }
/** * @return Returns the labelWidth. */ public int getLabelWidth() { return getComponentModel().labelWidth; }
/** * {@inheritDoc} */ @Override public Margin getMargin() { return getComponentModel().margin; }
/** * @return true if ordered layout */ public boolean isOrdered() { return getComponentModel().ordered; }
/** * Creates a WFieldLayout with the given layout type. * * @param layout one of {@link #LAYOUT_FLAT} or {@link #LAYOUT_STACKED}. */ public WFieldLayout(final String layout) { if ((layout == null) || (layout.length() == 0)) { throw new IllegalArgumentException("A layout must be supplied."); } if (!(layout.equals(LAYOUT_FLAT) || layout.equals(LAYOUT_STACKED))) { throw new IllegalArgumentException("Unknown layout: " + layout); } getComponentModel().layoutType = layout; }
/** * Get the title for this field layout. * * @return the title */ public String getTitle() { return I18nUtilities.format(null, getComponentModel().title); }