Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
755 bytes
|
Line | |
---|
1 | package com.framsticks.gui; |
---|
2 | |
---|
3 | import com.framsticks.params.CompositeParam; |
---|
4 | import com.framsticks.params.types.ObjectParam; |
---|
5 | |
---|
6 | |
---|
7 | import org.apache.commons.collections.CollectionUtils; |
---|
8 | import org.apache.commons.collections.functors.InstanceofPredicate; |
---|
9 | import org.apache.commons.collections.functors.NotPredicate; |
---|
10 | |
---|
11 | |
---|
12 | /** |
---|
13 | * Author: Piotr Śniegowski |
---|
14 | */ |
---|
15 | public class StandardPanelProvider implements PanelProvider { |
---|
16 | |
---|
17 | @SuppressWarnings("unchecked") |
---|
18 | @Override |
---|
19 | public TreePanel providePanel(TreePanel.Parameters parameters) { |
---|
20 | if (parameters.param instanceof ObjectParam) { |
---|
21 | return new ObjectPanel(parameters, CollectionUtils.select(parameters.framsClass.getParams(), new NotPredicate(new InstanceofPredicate(CompositeParam.class)))); |
---|
22 | } |
---|
23 | return null; |
---|
24 | } |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.