public class ActiveBagContent extends Object implements Domable
ActiveBoxContent
objects, currently in a ArrayList
, and provides methods to
manage it. The two main members of ActiveBagContent
are the
Shaper
, responsible of determining the position and shape of each
ActiveBox
based on it, and the
BoxBase
, that provides a common visual style.Modifier and Type | Field and Description |
---|---|
protected ArrayList<ActiveBoxContent> |
activeBoxContentArray |
protected ActiveBoxContent |
backgroundContent |
BoxBase |
bb |
boolean |
border |
static String |
BORDER |
static String |
CELL_HEIGHT |
static String |
CELL_WIDTH |
static String |
COLS |
static String |
COLUMNS |
int |
defaultIdValue |
static String |
ELEMENT_NAME |
double |
h |
static String |
IDS |
static String |
IMAGE |
Image |
img |
String |
imgName |
int |
nch |
int |
ncw |
static String |
ROWS |
protected Shaper |
shaper |
double |
w |
Constructor and Description |
---|
ActiveBagContent(int ncw,
int nch) |
public Image img
public String imgName
public int ncw
public int nch
public double w
public double h
public boolean border
public BoxBase bb
protected Shaper shaper
protected ActiveBoxContent backgroundContent
protected ArrayList<ActiveBoxContent> activeBoxContentArray
public int defaultIdValue
public static final String ELEMENT_NAME
public static final String ROWS
public static final String COLUMNS
public static final String COLS
public static final String CELL_WIDTH
public static final String CELL_HEIGHT
public static final String BORDER
public static final String IMAGE
public static final String IDS
public static ActiveBagContent initNew(int ncw, int nch, int firstChar)
public static ActiveBagContent initNew(int ncw, int nch, int firstChar, boolean withIds, boolean withItems, int w, int h)
public void checkCells()
public Element getJDomElement()
getJDomElement
in interface Domable
public int testCellContents()
public static ActiveBagContent getActiveBagContent(Element e, MediaBag mediaBag) throws Exception
Exception
public void setProperties(Element e, Object aux) throws Exception
setProperties
in interface Domable
Exception
public Shaper getShaper()
public void setShaper(Shaper sh)
public void addActiveBoxContent(ActiveBoxContent ab)
public ActiveBoxContent getActiveBoxContent(int i)
public ActiveBoxContent getActiveBoxContentWith(int id, int item)
public void deleteActiveBoxContentWith(int id, int item)
public void insertActiveBoxContentWith(int id, int item)
public int indexOf(ActiveBoxContent cnt)
public void setActiveBoxContentAt(ActiveBoxContent ab, int index)
public void setImgContent(MediaBagElement mbe, boolean roundSizes) throws Exception
Exception
public void setImgContent(MediaBagElement mbe, Shaper sh) throws Exception
Exception
public void setImgContent(MediaBagElement mbe, Shaper sh, boolean roundSizes) throws Exception
Exception
public void setTextContent(String[] txt, int setNcw, int setNch)
public boolean hasImg()
public double getTotalWidth()
public double getTotalHeight()
public int getNumCells()
public boolean isEmpty()
public void prepareMedia(PlayStation ps)
public void setBoxBase(BoxBase boxBase)
public void setIds(int[] ids)
public void setAllIdsTo(int id)
public void avoidAllIdsNull(int maxId)
public void copyStyleTo(ActiveBagContent abc)
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.