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 2010/07/11 15:08:06 UTC

svn commit: r963067 - in /pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra: TerraPanelSkin.java TerraTheme.java

Author: gbrown
Date: Sun Jul 11 13:08:06 2010
New Revision: 963067

URL: http://svn.apache.org/viewvc?rev=963067&view=rev
Log:
Add an index setter for panel background color.

Added:
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanelSkin.java
Modified:
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java

Added: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanelSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanelSkin.java?rev=963067&view=auto
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanelSkin.java (added)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanelSkin.java Sun Jul 11 13:08:06 2010
@@ -0,0 +1,30 @@
+/*
+ * 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.pivot.wtk.skin.terra;
+
+import org.apache.pivot.wtk.Theme;
+import org.apache.pivot.wtk.skin.PanelSkin;
+
+/**
+ * Terra panel skin.
+ */
+public class TerraPanelSkin extends PanelSkin {
+    public final void setBackgroundColor(int backgroundColor) {
+        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        setBackgroundColor(theme.getColor(backgroundColor));
+    }
+}

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java?rev=963067&r1=963066&r2=963067&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java Sun Jul 11 13:08:06 2010
@@ -57,6 +57,7 @@ import org.apache.pivot.wtk.MenuPopup;
 import org.apache.pivot.wtk.MessageType;
 import org.apache.pivot.wtk.Meter;
 import org.apache.pivot.wtk.Palette;
+import org.apache.pivot.wtk.Panel;
 import org.apache.pivot.wtk.Panorama;
 import org.apache.pivot.wtk.Prompt;
 import org.apache.pivot.wtk.PushButton;
@@ -122,6 +123,7 @@ public final class TerraTheme extends Th
         componentSkinMap.put(MenuPopup.class, TerraMenuPopupSkin.class);
         componentSkinMap.put(Meter.class, TerraMeterSkin.class);
         componentSkinMap.put(Palette.class, TerraPaletteSkin.class);
+        componentSkinMap.put(Panel.class, TerraPanelSkin.class);
         componentSkinMap.put(Panorama.class, TerraPanoramaSkin.class);
         componentSkinMap.put(Prompt.class, TerraPromptSkin.class);
         componentSkinMap.put(PushButton.class, TerraPushButtonSkin.class);