當前位置: 首頁>>代碼示例>>Java>>正文


Java OutlineModel.addRow方法代碼示例

本文整理匯總了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));
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:17,代碼來源:ModifierList.java

示例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();
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:17,代碼來源:ModifierListEditor.java

示例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));
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:19,代碼來源:SkillList.java

示例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);
    }
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:18,代碼來源:CharacterSheet.java

示例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);
    }
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:18,代碼來源:CharacterSheet.java

示例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));
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:17,代碼來源:AdvantageList.java

示例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;
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:26,代碼來源:WeaponEditor.java

示例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));
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:16,代碼來源:EquipmentList.java

示例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);
        }
    }
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:9,代碼來源:SheetDockable.java

示例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));
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:16,代碼來源:SpellList.java

示例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();
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:11,代碼來源:WeaponEditor.java

示例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));
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:16,代碼來源:NoteList.java


注:本文中的com.trollworks.toolkit.ui.widget.outline.OutlineModel.addRow方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。