001 /* JAPI - (Yet another (hopefully) useful) Java API 002 * 003 * Copyright (C) 2004-2006 Christian Hujer 004 * 005 * This program is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU General Public License as 007 * published by the Free Software Foundation; either version 2 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, but 011 * WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License 016 * along with this program; if not, write to the Free Software 017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 018 * 02111-1307, USA. 019 */ 020 021 package net.sf.japi.swing.prefs.keys; 022 023 import java.util.List; 024 import net.sf.japi.swing.ActionFactory; 025 026 /** 027 * TODO 028 * @author <a href="mailto:chris@riedquat.de">Christian Hujer</a> 029 */ 030 public class KeyStrokeRootNode extends AbstractSimpleNode<ActionMapNode> { 031 032 /** Create a KeyStrokeRootNode. 033 * @param factories ActionFactories 034 */ 035 public KeyStrokeRootNode(final List<ActionFactory> factories) { 036 super(createChildren(factories)); 037 } 038 039 /** Create the children from ActionFactories. 040 * @param factories ActionFactories 041 * @return children 042 */ 043 @SuppressWarnings({"ObjectAllocationInLoop"}) 044 private static ActionMapNode[] createChildren(final List<ActionFactory> factories) { 045 final ActionMapNode[] children = new ActionMapNode[factories.size()]; 046 for (int i = 0; i < children.length; i++) { 047 children[i] = new ActionMapNode(factories.get(i).getActionMap()); 048 } 049 return children; 050 } 051 052 /** {@inheritDoc} */ 053 public Object getValueAt(final int column) { 054 return null; //TODO 055 } 056 057 } // class KeyStrokeRootNode