/** * Instantiate each child view. * * @param table model * @param child component name */ protected View createChild(CCActionTableModel tableModel, String name) { if (name.equals(CHILD_ACTION_TABLE)) { // Action table. CCActionTable child = new CCActionTable(this, tableModel, name); tableModel.setShowSelectionSortIcon(false); return child; } else if (tableModel.isChildSupported(name)) { // Create child from action table model. return tableModel.createChild(this, name); } else { throw new IllegalArgumentException("Invalid child name [" + name + "]"); } }
public View createChild(String name) { TraceUtil.trace3(new NonSyncStringBuffer("Entering: name is ").append(name).toString()); if (name.equals(TILED_VIEW)) { return new VersionHighlightTiledView(this, getTableModel(VERSION_TABLE), name); } else if (name.equals(VERSION_TABLE)) { return createTable(name, TILED_VIEW); } else { CCActionTableModel model = super.isChildSupported(name); if (model != null) return model.createChild(this, name); } // child with no known parent throw new IllegalArgumentException("invalid child '" + name + "'"); }
/** * Instantiate each child view. * * @param table model * @param child component name * @param tiled view name */ protected View createChild(CCActionTableModel tableModel, String name, String tiledViewName) { // e.g. tileViewName can be "FileSystemSummaryView.CHILD_TILED_VIEW" if (name.equals(CHILD_ACTION_TABLE)) { // Action table. CCActionTable child = new CCActionTable(this, tableModel, name); tableModel.setShowSelectionSortIcon(false); child.setTiledView((ContainerView) getChild(tiledViewName)); return child; } else if (tableModel.isChildSupported(name)) { // Create child from action table model. return tableModel.createChild(this, name); } else { throw new IllegalArgumentException("Invalid child name [" + name + "]"); } }
protected View createChild(String name) { View view = null; if (name.equals(PGTITLE_THREE_BTNS)) { view = new CCPageTitle(this, ptModel, name); } else if (name.equals(PROPERTIES)) { view = new CCTextField(this, name, ""); } else if (ptModel.isChildSupported(name)) { view = ptModel.createChild(this, name); } else if (tblModel.isChildSupported(name)) { view = tblModel.createChild(this, name); } else if (name.equals(TBL_PROPERTIES)) { view = new CCActionTable(this, tblModel, name); } else { view = super.createChild(name); } return view; }