Skip to content

Commit

Permalink
jndi view styles
Browse files Browse the repository at this point in the history
  • Loading branch information
heiko-braun committed Aug 7, 2012
1 parent 16df2cd commit 1835410
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.cellview.client.CellTree;
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy;
import com.google.gwt.user.client.Command;
import com.google.gwt.view.client.ListDataProvider;
import com.google.gwt.view.client.SingleSelectionModel;
Expand All @@ -42,9 +43,16 @@ public class JndiTreeParser {
private Stack<JndiEntry> stack = new Stack<JndiEntry>();
private JndiEntry root = new JndiEntry("JNDI", "", null);
private TreeViewModel treeModel = new JndiTreeModel(root);
private CellTree cellTree = new DefaultCellTree(treeModel, "root");

private static Command finishCmd = null;
private SingleSelectionModel<JndiEntry> selectionModel = new SingleSelectionModel<JndiEntry>();
private DefaultCellTree cellTree;

public JndiTreeParser() {
cellTree = new DefaultCellTree(treeModel, "root");
cellTree.setStyleName("jndi-tree");
cellTree.setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy.ENABLED);
}

SingleSelectionModel<JndiEntry> getSelectionModel() {
return selectionModel;
Expand Down Expand Up @@ -131,7 +139,7 @@ private void dump(Property sibling) {
class JndiEntryCell extends AbstractCell<JndiEntry> {
@Override
public void render(Context context, JndiEntry value, SafeHtmlBuilder sb) {
sb.appendHtmlConstant("<table width='100%'>");
sb.appendHtmlConstant("<table width='100%' border=0>");
sb.appendHtmlConstant("<tr>");
sb.appendHtmlConstant("<td width='60%'>");
sb.appendEscaped(value.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

import com.google.gwt.user.cellview.client.CellTree;
import com.google.gwt.user.cellview.client.TreeNode;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
Expand Down Expand Up @@ -55,6 +57,7 @@ public Widget createWidget() {

uriLabel = new HTML(SELECTED_URI_PREFIX, true);
layout.add(uriLabel);
uriLabel.getElement().setAttribute("style", "margin-bottom:10px");

layout.add(container);

Expand Down Expand Up @@ -111,5 +114,11 @@ private void walk(TreeNode node) {
@Override
public void clearValues() {
container.clear();


/*Element div = DOM.createDiv();
div.setInnerHTML("No items!");
div.setAttribute("style", "text-align:center;width:100%; height:50px; color:#cccccc; padding-top:22px;");
container.getElement().appendChild(div);*/
}
}
22 changes: 21 additions & 1 deletion gui/src/main/java/org/jboss/as/console/public/lab.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,24 @@ input[type="checkbox"] {

.expression-icon {
cursor: pointer;
}
}

.jndi-tree {
width:100%;
background-color: #FFFFFF;
border: 1px solid #DCDCDC;
border-radius: 4px 4px 4px 4px;
color: black;
font-family: Arial,Verdana,sans-serif;
font-size: 11px;
margin-left:5px;
margin-right:5px;
}

.cellTreeKeyboardSelectedItem {
border: 1px dotted #3F3F3F!important;
}

.cellTreeTopItemImageValue {
border:none!important;
}

0 comments on commit 1835410

Please sign in to comment.