You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ck...@apache.org on 2007/11/14 21:14:26 UTC
svn commit: r595029 [1/3] - in /myfaces/trinidad/trunk/trinidad:
src/site/xdoc/
trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/
trinidad-examples/trinidad-demo/src/main/webapp/demos/
trinidad-examples/trinidad-demo/src/ma...
Author: ckormos
Date: Wed Nov 14 12:14:19 2007
New Revision: 595029
URL: http://svn.apache.org/viewvc?rev=595029&view=rev
Log:
fix for TRINIDAD-769 Tree / TreeTable skinning improvements (thanks to Cristi Toth for provinding the patch).
Added:
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/document.png (with props)
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-closed.png (with props)
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-open.png (with props)
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/images/nav-minus.gif (with props)
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/images/nav-plus.gif (with props)
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/images/tree-line-last.gif (with props)
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/images/tree-line-middle.gif (with props)
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/images/tree-line-trunk.gif (with props)
Modified:
myfaces/trinidad/trunk/trinidad/src/site/xdoc/skin-selectors.xml
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/DemoTreeData.java
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/InfiniteTree.java
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TreeNodeImpl.java
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/demos/panelPageSkinDemo.jspx
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/beach.css
myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/purple/purpleSkin.css
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/BaseDesktopSkin.java
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinProperties.java
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeNodeColumnRenderer.java
Modified: myfaces/trinidad/trunk/trinidad/src/site/xdoc/skin-selectors.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/src/site/xdoc/skin-selectors.xml?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/src/site/xdoc/skin-selectors.xml (original)
+++ myfaces/trinidad/trunk/trinidad/src/site/xdoc/skin-selectors.xml Wed Nov 14 12:14:19 2007
@@ -4206,6 +4206,93 @@
<td>Changing this icon changes both af|breadCrumbs::separator-icon and
af|treeTable::separator-icon</td>
</tr>
+ <tr>
+ <td>af|treeTable::expand-all-icon</td>
+ <td>The expand-all link icon.</td>
+ </tr>
+ <tr>
+ <td>af|treeTable::collapse-all-icon</td>
+ <td>The collapse-all link icon.</td>
+ </tr>
+ <tr>
+ <td>af|treeTable::node-icon</td>
+ <td>This icon selector is used in the case the Node class has a getNodeType()
+ method that returns the node type as string. The nodetype gets added to this
+ selector separated by a ':'. If the node is a container (has children) the
+ following suffixes get added depending on the expanded/collapsed state:
+ '-expanded' / '-collapsed'. i.e.
+ "af|treeTable::node-icon:container-collapsed",
+ "af|treeTable::node-icon:container-expanded",
+ "af|treeTable::node-icon:noncontainer".
+ </td>
+ </tr>
+ </table>
+ </subsection>
+ <subsection name="tr:tree Component">
+ <table>
+ <tr>
+ <th colspan="2">
+ <i>Icon Selectors</i>
+ </th>
+ </tr>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>af|tree::expanded-icon</td>
+ <td>This icon is displayed before the expanded tree node.</td>
+ </tr>
+ <tr>
+ <td>af|treeTable::collapsed-icon</td>
+ <td>This icon is displayed before the collapsed tree node.</td>
+ </tr>
+ <tr>
+ <td>af|treeTable::line-icon</td>
+ <td>This icon is used as a vertical line between the nodes.
+ </td>
+ </tr>
+ <tr>
+ <td>af|treeTable::line-middle-icon</td>
+ <td>This icon is used as the horizontal line in the background of the
+ expand/collapse icon of the node, in the case the node is not the last
+ sibling of its parent node.
+ </td>
+ </tr>
+ <tr>
+ <td>af|treeTable::line-last-icon</td>
+ <td>This icon is used as the horizontal line in the background of the
+ expand/collapse icon of the node, in the case the node is the last
+ sibling of its parent node.
+ </td>
+ </tr>
+ <tr>
+ <td>af|treeTable::node-icon</td>
+ <td>This icon selector is used in the case the Node class has a getNodeType()
+ method that returns the node type as string. The nodetype gets added to this
+ selector separated by a ':'. If the node is a container (has children) the
+ following suffixes get added depending on the expanded/collapsed state:
+ '-expanded' / '-collapsed'. e.g.
+ "af|treeTable::node-icon:container-collapsed",
+ "af|treeTable::node-icon:container-expanded",
+ "af|treeTable::node-icon:noncontainer".
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">
+ <i>Trinidad properties</i>
+ </th>
+ </tr>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>-tr-show-lines</td>
+ <td>Valid values are true or false (default true).
+ Determines whether the tree lines are displayed or not. e.g., af|tree
+ {-tr-show-lines:false} will not show the lines of the tree.</td>
+ </tr>
</table>
</subsection>
</section>
Modified: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/DemoTreeData.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/DemoTreeData.java?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/DemoTreeData.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/DemoTreeData.java Wed Nov 14 12:14:19 2007
@@ -40,6 +40,7 @@
TreeNodeImpl data = new TreeNodeImpl();
data.setText(text);
data.setDestination( "http://www.oracle.com");
+ data.setNodeType("document");
return data;
}
@@ -68,19 +69,23 @@
list_0.add(node_0_4);
list_0.add(node_0_5);
node_0.setChildren(list_0);
+ node_0.setNodeType("folder");
ArrayList<TreeNodeImpl> list_0_0 = new ArrayList<TreeNodeImpl>();
list_0_0.add(node_0_0_0);
list_0_0.add(node_0_0_1);
node_0_0.setChildren(list_0_0);
+ node_0_0.setNodeType("folder");
ArrayList<TreeNodeImpl> list_0_0_0 = new ArrayList<TreeNodeImpl>();
list_0_0_0.add(node_0_0_0_0);
node_0_0_0.setChildren(list_0_0_0);
+ node_0_0_0.setNodeType("folder");
ArrayList<TreeNodeImpl> list_0_1 = new ArrayList<TreeNodeImpl>();
list_0_1.add(node_0_1_0);
list_0_1.add(node_0_1_1);
node_0_1.setChildren(list_0_1);
+ node_0_1.setNodeType("folder");
}
}
Modified: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/InfiniteTree.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/InfiniteTree.java?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/InfiniteTree.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/InfiniteTree.java Wed Nov 14 12:14:19 2007
@@ -18,11 +18,11 @@
*/
package org.apache.myfaces.trinidaddemo;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
import java.io.Serializable;
import java.util.AbstractList;
import java.util.List;
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
public class InfiniteTree extends AbstractList<InfiniteTree.Bean> implements Serializable
{
@@ -88,6 +88,11 @@
public List<InfiniteTree.Bean> getKids()
{
return new InfiniteTree(getLabel());
+ }
+
+ public String getNodeType()
+ {
+ return "folder";
}
private final int _index;
Modified: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TreeNodeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TreeNodeImpl.java?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TreeNodeImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TreeNodeImpl.java Wed Nov 14 12:14:19 2007
@@ -77,9 +77,19 @@
return Collections.unmodifiableList(_nodes);
}
+ public String getNodeType()
+ {
+ return _nodeType;
+ }
+
+ public void setNodeType(String nodeType)
+ {
+ this._nodeType = nodeType;
+ }
private String _text = null;
private String _destination = null;
private String _icon = null;
+ private String _nodeType = null;
private List<TreeNodeImpl> _nodes;
}
Modified: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/demos/panelPageSkinDemo.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/demos/panelPageSkinDemo.jspx?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/demos/panelPageSkinDemo.jspx (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/demos/panelPageSkinDemo.jspx Wed Nov 14 12:14:19 2007
@@ -28,7 +28,7 @@
<trh:html>
<trh:head title="Skin Demo">
<!-- the beach skin is defined in beach.css. If you want to add your own
- custom style classes, you can add it to beach.css or to your own css
+ custom style classes, you can add it to beach.css or to your own css
file, like what we demo here in beachCustomStyles.css -->
<link rel="stylesheet" charset="UTF-8" type="text/css"
href="/adf-faces-demo-context-root/skins/beach/CustomStyles.css"/>
@@ -164,7 +164,7 @@
<tr:showDetailItem text="Tab 4" disabled="true"/>
<tr:showDetailItem text="Tab 5">
<tr:panelHeader text="Header 5">
-
+
<tr:table allDetailsEnabled="true" var="row"
rowBandingInterval="2"
value="#{periodicTable.tableData}" rows="10"
@@ -185,6 +185,11 @@
</tr:panelHeader>
</tr:showDetailItem>
</tr:panelTabbed>
+ <tr:tree var="foo" value="#{tree.model}">
+ <f:facet name="nodeStamp">
+ <tr:outputText value="#{foo.text}"/>
+ </f:facet>
+ </tr:tree>
</tr:panelGroupLayout>
<tr:panelGroupLayout layout="vertical">
<f:facet name="separator">
Modified: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/beach.css
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/beach.css?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/beach.css (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/beach.css Wed Nov 14 12:14:19 2007
@@ -655,3 +655,28 @@
}
/* END the Tabs End */
+
+
+af|tree::node-icon:folder-expanded{
+ content: url(/skins/beach/images/yellow-folder-open.png);
+}
+
+af|tree::node-icon:folder-collapsed{
+ content: url(/skins/beach/images/yellow-folder-closed.png);
+}
+
+af|tree::node-icon:document{
+ content: url(/skins/beach/images/document.png);
+}
+
+af|treeTable::node-icon:folder-expanded{
+ content: url(/skins/beach/images/yellow-folder-open.png);
+}
+
+af|treeTable::node-icon:folder-collapsed{
+ content: url(/skins/beach/images/yellow-folder-closed.png);
+}
+
+af|treeTable::node-icon:document{
+ content: url(/skins/beach/images/document.png);
+}
\ No newline at end of file
Added: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/document.png
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/document.png?rev=595029&view=auto
==============================================================================
Binary file - no diff available.
Propchange: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/document.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-closed.png
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-closed.png?rev=595029&view=auto
==============================================================================
Binary file - no diff available.
Propchange: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-closed.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-open.png
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-open.png?rev=595029&view=auto
==============================================================================
Binary file - no diff available.
Propchange: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/beach/images/yellow-folder-open.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/purple/purpleSkin.css
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/purple/purpleSkin.css?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/purple/purpleSkin.css (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/skins/purple/purpleSkin.css Wed Nov 14 12:14:19 2007
@@ -875,4 +875,8 @@
}
.AFFooIcon:alias {content:url(/skins/purple/images/btns.gif); width:7px; height:18px}
-.AFBarIcon {content:url(/skins/purple/images/btns.gif); width:7px; height:18px}
\ No newline at end of file
+.AFBarIcon {content:url(/skins/purple/images/btns.gif); width:7px; height:18px}
+
+af|tree {
+ -tr-show-lines:false;
+}
\ No newline at end of file
Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java Wed Nov 14 12:14:19 2007
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -93,9 +93,9 @@
{
decodeSelection(context, component);
- Map<String, String> parameters =
+ Map<String, String> parameters =
context.getExternalContext().getRequestParameterMap();
-
+
Object source = parameters.get(XhtmlConstants.SOURCE_PARAM);
if (component.getClientId(context).equals(source))
{
@@ -164,7 +164,7 @@
TreeUtils.setDefaultFocusRowKey((UIXTree) component);
TreeUtils.expandFocusRowKey((UIXTree) component);
-
+
super.encodeAll(context, arc, component, bean);
// have we rendered the script before?
@@ -260,16 +260,49 @@
tContext.getJSVarName(),
true /*isExpand*/);
renderControlBarLink(context, arc, onclick, _EXPAND_ALL_TEXT_KEY,
+ arc.getIcon(SkinSelectors.AF_TREE_TABLE_EXPAND_ALL_ICON_NAME),
preId+"eAll", true);
onclick =
TreeUtils.callJSExpandAll(hContext.getUIXTreeTable(),
tContext.getJSVarName(),
false /*isExpand*/);
renderControlBarLink(context, arc, onclick, _COLLAPSE_ALL_TEXT_KEY,
+ arc.getIcon(SkinSelectors.AF_TREE_TABLE_COLLAPSE_ALL_ICON_NAME),
preId+"cAll", useDivider);
}
}
+ protected void renderControlBarLink(
+ FacesContext context,
+ RenderingContext arc,
+ String onclick,
+ String translationKey,
+ Icon icon,
+ String id,
+ boolean hasDivider
+ ) throws IOException
+ {
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement("a", null);
+ writer.writeAttribute(XhtmlConstants.ID_ATTRIBUTE, id, null);
+ renderStyleClass(context, arc, SkinSelectors.NAV_BAR_ALINK_STYLE_CLASS);
+ writer.writeAttribute("onclick", onclick, null);
+ writer.writeURIAttribute("href", "#", null);
+ if (icon != null)
+ {
+ OutputUtils.renderIcon(context, arc, icon, arc.getTranslatedString(translationKey),
+ null);
+ } else
+ {
+ writer.writeText(arc.getTranslatedString(translationKey), null);
+ }
+
+ writer.endElement("a");
+
+ if (hasDivider)
+ writer.writeText(LINKS_DIVIDER_TEXT, null);
+ }
+
protected boolean isExpandAllEnabled(UIComponent component)
{
FacesBean bean = getFacesBean(component);
@@ -365,7 +398,7 @@
return !Boolean.FALSE.equals(bean.getProperty(_rootNodeRendered));
}
-
+
//
// Private methods
//
@@ -473,7 +506,7 @@
renderSingleRow(context, arc, ttrc, treeTableBase);
writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
}
-
+
//
// if (hasInvisibleNodes)
// {
@@ -635,9 +668,9 @@
protected Map<String, String> createResourceKeyMap()
{
Map<String, String> tablemap = super.createResourceKeyMap();
- Map<String, String> map =
+ Map<String, String> map =
ResourceKeyUtils.convertResourceKeyMap(tablemap, "table", "treeTable");
-
+
// we need a resource key map since we are using a navigationPath.
// and we are using table for the styles
map.put(SkinSelectors.AF_NAVIGATION_PATH_SEPARATOR_ICON_NAME,
@@ -652,7 +685,7 @@
SkinSelectors.AF_TREE_TABLE_CONTROL_BAR_TOP_STYLE);
map.put(SkinSelectors.AF_TABLE_CONTROL_BAR_BOTTOM_STYLE,
SkinSelectors.AF_TREE_TABLE_CONTROL_BAR_BOTTOM_STYLE);
-
+
return Collections.unmodifiableMap(map);
}
Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/BaseDesktopSkin.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/BaseDesktopSkin.java?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/BaseDesktopSkin.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/BaseDesktopSkin.java Wed Nov 14 12:14:19 2007
@@ -48,6 +48,7 @@
{
// Not sure where this comes from!
setProperty(SkinProperties.AF_PANEL_BORDER_LAYOUT_SPACER_WIDTH, "2");
+ setProperty(SkinProperties.AF_TREE_SHOW_LINES, true);
}
/**
@@ -176,12 +177,14 @@
// HGrid icons
// (treeTable)
SkinSelectors.AF_TREE_TABLE_EXPANDED_ICON_NAME,
- new MacOSSwitcherIcon(new TextIcon("\u25BC"),
- new TextIcon("\u2193")),
+ new ContextImageIcon("adf/images/nav-minus.gif",
+ 19,
+ 18),
SkinSelectors.AF_TREE_TABLE_COLLAPSED_ICON_NAME,
- new MacOSSwitcherIcon(new TextIcon("\u25BA", "\u25C4"),
- new TextIcon("\u2192", "\u2190")),
+ new ContextImageIcon("adf/images/nav-plus.gif",
+ 19,
+ 18),
SkinSelectors.AF_TREE_TABLE_FOCUS_ICON_NAME,
new TextIcon("X",
@@ -194,6 +197,31 @@
null,
SkinSelectors.AF_TREE_TABLE_LOCATOR_ICON_STYLE_CLASS,
null),
+
+ SkinSelectors.AF_TREE_EXPANDED_ICON,
+ new ContextImageIcon("adf/images/nav-minus.gif",
+ 19,
+ 18),
+
+ SkinSelectors.AF_TREE_COLLAPSED_ICON,
+ new ContextImageIcon("adf/images/nav-plus.gif",
+ 19,
+ 18),
+
+ SkinSelectors.AF_TREE_LINE_ICON,
+ new ContextImageIcon("adf/images/tree-line-trunk.gif",
+ 19,
+ 18),
+
+ SkinSelectors.AF_TREE_LINE_MIDDLE_ICON,
+ new ContextImageIcon("adf/images/tree-line-middle.gif",
+ 19,
+ 18),
+
+ SkinSelectors.AF_TREE_LINE_LAST_ICON,
+ new ContextImageIcon("adf/images/tree-line-last.gif",
+ 19,
+ 18),
// SelectInputText Icons
SkinSelectors.AF_SELECT_INPUT_TEXT_BUTTON_ICON_NAME,
Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinProperties.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinProperties.java?rev=595029&r1=595028&r2=595029&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinProperties.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinProperties.java Wed Nov 14 12:14:19 2007
@@ -1,53 +1,55 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
-
-/**
- * This class contains all valid predefined skin properties used by Trinidad.
- * The properties are sorted alphabetically.
- *
- */
-public final class SkinProperties
-{
- private SkinProperties(){}
-
- //
- // Copied from XhtmlLafConstants
- //
- // FIXME: Name inconsistency, should be AF_NAVIGATION_PATH
- public static final String AF_NAVIGATIONPATH_SHOW_LAST_ITEM_PROPERTY_KEY =
- "af|breadCrumbs-tr-show-last-item";
- // FIXME: Name inconsistency, should be AF_PANEL_HEADER
- public static final String AF_PANELHEADER_INDENT_CONTENT =
- "af|panelHeader-tr-indent-content";
- public static final String AF_PANEL_BORDER_LAYOUT_SPACER_WIDTH =
- "af|panelBorderLayout-tr-spacer-width";
- public static final String AF_PANEL_LIST_DEFAULT_COLUMNS =
- "af|panelList-tr-default-columns";
- public static final String AF_TABLE_REPEAT_CONTROL_BAR =
- "af|table-tr-repeat-control-bar";
- public static final String AF_TABLE_SELECTION_BAR_IN_TABLE =
- "af|table-tr-selection-bar-in-table";
- public static final String AF_TRAIN_RENDER_PARENT_TRAIN =
- "af|train-tr-render-parent-train";
- public static final String AF_TRAIN_VISIBLE_STOP_COUNT =
- "af|train-tr-visible-stop-count";
- public static final String AF_TREE_TABLE_SPACER_WIDTH =
- "af|treeTable-tr-spacer-width";
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
+
+/**
+ * This class contains all valid predefined skin properties used by Trinidad.
+ * The properties are sorted alphabetically.
+ *
+ */
+public final class SkinProperties
+{
+ private SkinProperties(){}
+
+ //
+ // Copied from XhtmlLafConstants
+ //
+ // FIXME: Name inconsistency, should be AF_NAVIGATION_PATH
+ public static final String AF_NAVIGATIONPATH_SHOW_LAST_ITEM_PROPERTY_KEY =
+ "af|breadCrumbs-tr-show-last-item";
+ // FIXME: Name inconsistency, should be AF_PANEL_HEADER
+ public static final String AF_PANELHEADER_INDENT_CONTENT =
+ "af|panelHeader-tr-indent-content";
+ public static final String AF_PANEL_BORDER_LAYOUT_SPACER_WIDTH =
+ "af|panelBorderLayout-tr-spacer-width";
+ public static final String AF_PANEL_LIST_DEFAULT_COLUMNS =
+ "af|panelList-tr-default-columns";
+ public static final String AF_TABLE_REPEAT_CONTROL_BAR =
+ "af|table-tr-repeat-control-bar";
+ public static final String AF_TABLE_SELECTION_BAR_IN_TABLE =
+ "af|table-tr-selection-bar-in-table";
+ public static final String AF_TRAIN_RENDER_PARENT_TRAIN =
+ "af|train-tr-render-parent-train";
+ public static final String AF_TRAIN_VISIBLE_STOP_COUNT =
+ "af|train-tr-visible-stop-count";
+ public static final String AF_TREE_TABLE_SPACER_WIDTH =
+ "af|treeTable-tr-spacer-width";
+ public static final String AF_TREE_SHOW_LINES =
+ "af|tree-tr-show-lines";
+}