public class FormSection extends LocalizedObject implements java.io.Serializable, java.lang.Cloneable
Constructor and Description |
---|
FormSection(int nbRows,
int nbCols) |
Modifier and Type | Method and Description |
---|---|
void |
addColumn() |
void |
addColumn(int index) |
void |
addRow() |
void |
addRow(int index) |
FormSection |
clone() |
java.util.Set<java.lang.String> |
getAttributes() |
AbstractFormField |
getField(int rowIx,
int colIx) |
<T> java.util.List<T> |
getFields(java.lang.Class<T> fieldType) |
AbstractFormInputField |
getFormInputField(Attribute attribute) |
FormRow |
getFormRowForField(AbstractFormField formField) |
int |
getMaxColSpan(AbstractFormField formField) |
java.util.List<AbstractFormInputField> |
getNonRequiredInputFields() |
java.util.List<FormRow> |
getRows() |
java.lang.String |
getSectionName(java.util.Locale locale) |
static FormSection |
importFormSection(java.lang.String formGuiString,
FormGuiImporter formGuiImporter) |
void |
pack()
Removes empty rows at the beginning/end of the form and empty columns at the right of the form.
|
void |
removeColumn(int columnIx) |
void |
removeRow(int rowIx) |
void |
removeTranslationsOtherThan(java.util.Locale[] locales)
Removes any
Locale from this object that are not in the specified locales . |
AbstractFormField |
replaceField(int rowIx,
int colIx,
AbstractFormField formField) |
void |
setSectionName(java.lang.String sectionName,
java.util.Locale locale) |
java.lang.String |
toGuiString() |
java.lang.String |
toString() |
getAvailableLocales, getTranslation, isTranslationExists, setTranslation, updateTranslations
public java.lang.String getSectionName(java.util.Locale locale)
public void setSectionName(java.lang.String sectionName, java.util.Locale locale)
public java.util.List<FormRow> getRows()
public AbstractFormField getField(int rowIx, int colIx)
public void addRow()
public void addRow(int index)
public void removeRow(int rowIx)
public void addColumn()
public void addColumn(int index)
public void removeColumn(int columnIx)
public AbstractFormField replaceField(int rowIx, int colIx, AbstractFormField formField)
public FormRow getFormRowForField(AbstractFormField formField)
public int getMaxColSpan(AbstractFormField formField)
public java.util.Set<java.lang.String> getAttributes()
public <T> java.util.List<T> getFields(java.lang.Class<T> fieldType)
public java.util.List<AbstractFormInputField> getNonRequiredInputFields()
public AbstractFormInputField getFormInputField(Attribute attribute)
public void pack()
public java.lang.String toGuiString()
public FormSection clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void removeTranslationsOtherThan(java.util.Locale[] locales)
LocalizedObject
Locale
from this object that are not in the specified locales
.
locales[0]
should be the default languageremoveTranslationsOtherThan
in class LocalizedObject
public static FormSection importFormSection(java.lang.String formGuiString, FormGuiImporter formGuiImporter)