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


Java OutlineModel.getRowCount方法代碼示例

本文整理匯總了Java中com.trollworks.toolkit.ui.widget.outline.OutlineModel.getRowCount方法的典型用法代碼示例。如果您正苦於以下問題:Java OutlineModel.getRowCount方法的具體用法?Java OutlineModel.getRowCount怎麽用?Java OutlineModel.getRowCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.trollworks.toolkit.ui.widget.outline.OutlineModel的用法示例。


在下文中一共展示了OutlineModel.getRowCount方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: deleteSelection

import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
@Override
public void deleteSelection() {
    if (canDeleteSelection()) {
        OutlineModel model = getModel();
        StateEdit edit = new StateEdit(model, CLEAR_UNDO);
        Row[] rows = model.getSelectionAsList(true).toArray(new Row[0]);
        mDataFile.startNotify();
        model.removeSelection();
        for (int i = rows.length - 1; i >= 0; i--) {
            rows[i].removeFromParent();
        }
        if (model.getRowCount() > 0) {
            updateAllRows();
        }
        // Send it out again, since we have a few chicken-and-egg
        // scenarios to deal with... <sigh>
        mDataFile.notify(mRowSetChangedID, null);
        mDataFile.endNotify();
        edit.end();
        postUndo(edit);
    }
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:23,代碼來源:ListOutline.java

示例2: OutlineInfo

import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
/**
 * Creates a new outline information holder.
 *
 * @param outline The outline to collect information about.
 * @param contentWidth The content width.
 */
public OutlineInfo(Outline outline, int contentWidth) {
    int one = Scale.get(outline).scale(1);
    Insets insets = new TitledBorder().getBorderInsets(outline);
    OutlineModel outlineModel = outline.getModel();
    int count = outlineModel.getRowCount();
    List<Column> columns = outlineModel.getColumns();
    boolean hasRowDividers = outline.shouldDrawRowDividers();

    ColumnUtils.pack(outline, contentWidth - (insets.left + insets.right));
    outline.updateRowHeights();

    mRowIndex = -1;
    mHeights = new int[count];

    for (int i = 0; i < count; i++) {
        Row row = outlineModel.getRowAtIndex(i);
        mHeights[i] = row.getHeight();
        if (mHeights[i] == -1) {
            mHeights[i] = row.getPreferredHeight(outline, columns);
        }
        if (hasRowDividers) {
            mHeights[i] += one;
        }
    }

    mOverheadHeight = insets.top + insets.bottom + outline.getHeaderPanel().getPreferredSize().height;
    mMinimumHeight = mOverheadHeight + (count > 0 ? mHeights[0] : 0);
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:35,代碼來源:OutlineInfo.java

示例3: saveList

import com.trollworks.toolkit.ui.widget.outline.OutlineModel; //導入方法依賴的package包/類
private static void saveList(String tag, OutlineModel model, XMLWriter out) {
    if (model.getRowCount() > 0) {
        out.startSimpleTagEOL(tag);
        for (ListRow row : new FilteredIterator<>(model.getTopLevelRows(), ListRow.class)) {
            row.save(out, false);
        }
        out.endTagEOL(tag, true);
    }
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:10,代碼來源:GURPSCharacter.java


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