Skip to content

Commit

Permalink
Allow more customization of pane layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheng5 committed Mar 11, 2011
1 parent 6415d82 commit e76ad6b
Show file tree
Hide file tree
Showing 9 changed files with 375 additions and 122 deletions.
15 changes: 15 additions & 0 deletions src/gwt/src/org/rstudio/core/client/StringUtil.java
Expand Up @@ -15,6 +15,8 @@
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.NumberFormat;

import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;

Expand Down Expand Up @@ -185,6 +187,19 @@ public static String indent(String str, String indent)
return indent + str.replaceAll("\n", "\n" + indent);
}

public static String join(AbstractCollection<?> collection,
String delim)
{
String currDelim = "";
StringBuilder output = new StringBuilder();
for (Object el : collection)
{
output.append(currDelim).append(el == null ? "" : el.toString());
currDelim = delim;
}
return output.toString();
}

private static final long[] SIZES = {
1024L, // kilobyte
1024L * 1024L, // megabyte
Expand Down
Expand Up @@ -102,11 +102,6 @@ well as menu structures (for main menu and popup menus).
<cmd refid="activatePlots"/>
<cmd refid="activatePackages"/>
<cmd refid="activateHelp"/>
<separator/>
<menu label="Pane Layout">
<cmd refid="consoleOnTop"/>
<cmd refid="plotsOnTop"/>
</menu>
</menu>

<separator/>
Expand Down Expand Up @@ -449,14 +444,6 @@ well as menu structures (for main menu and popup menus).
buttonLabel=""
desc="Refresh package listing"/>

<!-- consoleOnTop has a dynamic menuLabel -->
<cmd id="consoleOnTop"
menuLabel=""/>

<!-- plotsOnTop has a dynamic menuLabel -->
<cmd id="plotsOnTop"
menuLabel=""/>

<cmd id="showOptions"
menuLabel="Pr_eferences..."/>

Expand Down
Expand Up @@ -60,8 +60,6 @@ public abstract class Commands extends CommandBundle
public abstract AppCommand showFolder();

// View
public abstract AppCommand consoleOnTop();
public abstract AppCommand plotsOnTop();
public abstract AppCommand switchToTab();
public abstract AppCommand previousTab();
public abstract AppCommand nextTab();
Expand Down

0 comments on commit e76ad6b

Please sign in to comment.