本文整理匯總了Java中com.trollworks.toolkit.ui.widget.outline.OutlineModel.addRow方法的典型用法代碼示例。如果您正苦於以下問題:Java OutlineModel.addRow方法的具體用法?Java OutlineModel.addRow怎麽用?Java OutlineModel.addRow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.trollworks.toolkit.ui.widget.outline.OutlineModel
的用法示例。
在下文中一共展示了OutlineModel.addRow方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadList
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Modifier.TAG_MODIFIER.equals(name)) {
model.addRow(new Modifier(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例2: addModifier
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
private void addModifier() {
Modifier modifier = new Modifier(mOwner);
OutlineModel model = mOutline.getModel();
if (mOwner instanceof ListFile || mOwner instanceof LibraryFile) {
modifier.setEnabled(false);
}
model.addRow(modifier);
mOutline.sizeColumnsToFit();
model.select(modifier, false);
mOutline.revalidate();
mOutline.scrollSelectionIntoView();
mOutline.requestFocus();
mModified = true;
openDetailEditor();
}
示例3: loadList
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Skill.TAG_SKILL.equals(name) || Skill.TAG_SKILL_CONTAINER.equals(name)) {
model.addRow(new Skill(this, reader, state), true);
} else if (Technique.TAG_TECHNIQUE.equals(name)) {
model.addRow(new Technique(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例4: createMeleeWeaponOutline
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
private void createMeleeWeaponOutline() {
if (mMeleeWeaponOutline == null) {
OutlineModel outlineModel;
String sortConfig;
mMeleeWeaponOutline = new WeaponOutline(MeleeWeaponStats.class);
outlineModel = mMeleeWeaponOutline.getModel();
sortConfig = outlineModel.getSortConfig();
for (WeaponDisplayRow row : collectWeapons(MeleeWeaponStats.class)) {
outlineModel.addRow(row);
}
outlineModel.applySortConfig(sortConfig);
initOutline(mMeleeWeaponOutline);
} else {
resetOutline(mMeleeWeaponOutline);
}
}
示例5: createRangedWeaponOutline
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
private void createRangedWeaponOutline() {
if (mRangedWeaponOutline == null) {
OutlineModel outlineModel;
String sortConfig;
mRangedWeaponOutline = new WeaponOutline(RangedWeaponStats.class);
outlineModel = mRangedWeaponOutline.getModel();
sortConfig = outlineModel.getSortConfig();
for (WeaponDisplayRow row : collectWeapons(RangedWeaponStats.class)) {
outlineModel.addRow(row);
}
outlineModel.applySortConfig(sortConfig);
initOutline(mRangedWeaponOutline);
} else {
resetOutline(mRangedWeaponOutline);
}
}
示例6: loadList
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Advantage.TAG_ADVANTAGE.equals(name) || Advantage.TAG_ADVANTAGE_CONTAINER.equals(name)) {
model.addRow(new Advantage(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例7: createOutline
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
private Component createOutline(List<WeaponStats> weapons, Class<? extends WeaponStats> weaponClass) {
mOutline = new WeaponOutline();
OutlineModel model = mOutline.getModel();
WeaponColumn.addColumns(mOutline, weaponClass, true);
mOutline.setAllowColumnDrag(false);
mOutline.setAllowColumnResize(false);
mOutline.setAllowRowDrag(false);
for (WeaponStats weapon : weapons) {
if (mWeaponClass.isInstance(weapon)) {
model.addRow(new WeaponDisplayRow(weapon.clone(mOwner)));
}
}
mOutline.addActionListener(this);
Dimension size = mOutline.getMinimumSize();
if (size.height < 50) {
size.height = 50;
mOutline.setMinimumSize(size);
}
JScrollPane scroller = new JScrollPane(mOutline);
scroller.setColumnHeaderView(mOutline.getHeaderPanel());
return scroller;
}
示例8: loadList
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Equipment.TAG_EQUIPMENT.equals(name) || Equipment.TAG_EQUIPMENT_CONTAINER.equals(name)) {
model.addRow(new Equipment(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例9: addCompleteRow
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
private void addCompleteRow(OutlineModel outlineModel, Row row) {
outlineModel.addRow(row);
if (row.isOpen() && row.hasChildren()) {
for (Row child : row.getChildren()) {
addCompleteRow(outlineModel, child);
}
}
}
示例10: loadList
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Spell.TAG_SPELL.equals(name) || Spell.TAG_SPELL_CONTAINER.equals(name)) {
model.addRow(new Spell(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例11: addWeapon
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
private void addWeapon() {
WeaponDisplayRow weapon = new WeaponDisplayRow(createWeaponStats());
OutlineModel model = mOutline.getModel();
model.addRow(weapon);
mOutline.sizeColumnsToFit();
model.select(weapon, false);
mOutline.revalidate();
mOutline.scrollSelectionIntoView();
mOutline.requestFocus();
}
示例12: loadList
import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Note.TAG_NOTE.equals(name) || Note.TAG_NOTE_CONTAINER.equals(name)) {
model.addRow(new Note(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}