You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2009/08/31 21:38:40 UTC
svn commit: r809715 - in /incubator/pivot/trunk/wtk:
src/org/apache/pivot/wtk/skin/terra/ test/org/apache/pivot/wtk/test/
Author: gbrown
Date: Mon Aug 31 19:38:39 2009
New Revision: 809715
URL: http://svn.apache.org/viewvc?rev=809715&view=rev
Log:
Resolve issue PIVOT-89; also use PIVOT-21 to simplify code in TerraFileBrowserSheetSkin.
Modified:
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.wtkx
incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java?rev=809715&r1=809714&r2=809715&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java Mon Aug 31 19:38:39 2009
@@ -635,8 +635,10 @@
}
}
- today = new CalendarDate();
+ // Show/hide last row
+ calendarTablePane.getRows().get(7).setVisible(dateButtons[5][0].isEnabled());
+ today = new CalendarDate();
updateSelection(calendar.getSelectedDate());
}
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin.java?rev=809715&r1=809714&r2=809715&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin.java Mon Aug 31 19:38:39 2009
@@ -25,6 +25,7 @@
import org.apache.pivot.util.Filter;
import org.apache.pivot.util.Resources;
import org.apache.pivot.util.Vote;
+import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.Button;
import org.apache.pivot.wtk.ButtonPressListener;
import org.apache.pivot.wtk.Component;
@@ -36,7 +37,6 @@
import org.apache.pivot.wtk.Mouse;
import org.apache.pivot.wtk.PushButton;
import org.apache.pivot.wtk.Sheet;
-import org.apache.pivot.wtk.TablePane;
import org.apache.pivot.wtk.TextInput;
import org.apache.pivot.wtk.TextInputTextListener;
import org.apache.pivot.wtk.Window;
@@ -61,8 +61,7 @@
}
};
- @WTKX private TablePane tablePane = null;
- @WTKX private TablePane.Row saveAsRow = null;
+ @WTKX private BoxPane saveAsBoxPane = null;
@WTKX private TextInput saveAsTextInput = null;
@WTKX private FileBrowser fileBrowser = null;
@WTKX private PushButton okButton = null;
@@ -220,37 +219,25 @@
// Initialize layout and file browser selection state
switch (mode) {
case OPEN: {
- if (saveAsRow.getTablePane() != null) {
- tablePane.getRows().remove(saveAsRow);
- }
-
+ saveAsBoxPane.setVisible(false);
fileBrowser.setMultiSelect(false);
break;
}
case OPEN_MULTIPLE: {
- if (saveAsRow.getTablePane() != null) {
- tablePane.getRows().remove(saveAsRow);
- }
-
+ saveAsBoxPane.setVisible(false);
fileBrowser.setMultiSelect(true);
break;
}
case SAVE_AS: {
- if (saveAsRow.getTablePane() == null) {
- tablePane.getRows().insert(saveAsRow, 0);
- }
-
+ saveAsBoxPane.setVisible(true);
fileBrowser.setMultiSelect(false);
break;
}
case SAVE_TO: {
- if (saveAsRow.getTablePane() != null) {
- tablePane.getRows().remove(saveAsRow);
- }
-
+ saveAsBoxPane.setVisible(false);
fileBrowser.setMultiSelect(false);
break;
}
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.wtkx?rev=809715&r1=809714&r2=809715&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.wtkx (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.wtkx Mon Aug 31 19:38:39 2009
@@ -26,8 +26,8 @@
<TablePane.Column width="1*"/>
</columns>
<rows>
- <TablePane.Row wtkx:id="saveAsRow" height="-1">
- <BoxPane orientation="vertical" styles="{fill:true}">
+ <TablePane.Row height="-1">
+ <BoxPane wtkx:id="saveAsBoxPane" orientation="vertical" styles="{fill:true}">
<BoxPane styles="{verticalAlignment:'center'}">
<Label text="%saveAs"/>
<TextInput wtkx:id="saveAsTextInput" textSize="32"/>
Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java?rev=809715&r1=809714&r2=809715&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java Mon Aug 31 19:38:39 2009
@@ -31,7 +31,7 @@
throws Exception {
WTKXSerializer wtkxSerializer = new WTKXSerializer();
- FileBrowserSheet fileOpenSheet = new FileBrowserSheet(FileBrowserSheet.Mode.OPEN);
+ FileBrowserSheet fileOpenSheet = new FileBrowserSheet(FileBrowserSheet.Mode.SAVE_AS);
wtkxSerializer.put("fileOpenSheet", fileOpenSheet);
frame = (Frame)wtkxSerializer.readObject(getClass().getResource("file_browser_sheet_test.wtkx"));