[libbluray-devel] org.havi.ui.event: improve compatibility

hpi1 git at videolan.org
Fri May 13 09:35:17 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Apr 30 16:57:18 2016 +0300| [79ac7839cdf5d7d89a92bf8bacdc5201c179e5d9] | committer: hpi1

org.havi.ui.event: improve compatibility

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=79ac7839cdf5d7d89a92bf8bacdc5201c179e5d9
---

 src/libbluray/bdj/java/org/havi/ui/event/HActionListener.java  |    1 -
 .../bdj/java/org/havi/ui/event/HEventRepresentation.java       |    8 +++-----
 src/libbluray/bdj/java/org/havi/ui/event/HFocusEvent.java      |    4 +++-
 src/libbluray/bdj/java/org/havi/ui/event/HFocusListener.java   |    1 -
 src/libbluray/bdj/java/org/havi/ui/event/HKeyListener.java     |    1 -
 .../bdj/java/org/havi/ui/event/HMouseCapabilities.java         |    2 +-
 src/libbluray/bdj/java/org/havi/ui/event/HRcCapabilities.java  |    4 ++--
 7 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/libbluray/bdj/java/org/havi/ui/event/HActionListener.java b/src/libbluray/bdj/java/org/havi/ui/event/HActionListener.java
index 6b612fd..9b52fac 100644
--- a/src/libbluray/bdj/java/org/havi/ui/event/HActionListener.java
+++ b/src/libbluray/bdj/java/org/havi/ui/event/HActionListener.java
@@ -22,5 +22,4 @@ package org.havi.ui.event;
 import java.awt.event.ActionListener;
 
 public interface HActionListener extends ActionListener {
-
 }
diff --git a/src/libbluray/bdj/java/org/havi/ui/event/HEventRepresentation.java b/src/libbluray/bdj/java/org/havi/ui/event/HEventRepresentation.java
index 9d1c2ab..ca0be4a 100644
--- a/src/libbluray/bdj/java/org/havi/ui/event/HEventRepresentation.java
+++ b/src/libbluray/bdj/java/org/havi/ui/event/HEventRepresentation.java
@@ -22,9 +22,8 @@ package org.havi.ui.event;
 import java.awt.Color;
 import java.awt.Image;
 
-public class HEventRepresentation extends Object {
-    protected HEventRepresentation(boolean supported, String text, Color color, Image symbol) {
-        this.supported = supported;
+public class HEventRepresentation {
+    protected HEventRepresentation(String text, Color color, Image symbol) {
         this.text = text;
         this.color = color;
         this.symbol = symbol;
@@ -39,7 +38,7 @@ public class HEventRepresentation extends Object {
     }
 
     public boolean isSupported() {
-        return supported;
+        return type != ER_TYPE_NOT_SUPPORTED;
     }
 
     protected void setType(int aType) {
@@ -91,7 +90,6 @@ public class HEventRepresentation extends Object {
     public static final int ER_TYPE_COLOR = 2;
     public static final int ER_TYPE_SYMBOL = 4;
 
-    private boolean supported;
     private String text;
     private Color color;
     private Image symbol;
diff --git a/src/libbluray/bdj/java/org/havi/ui/event/HFocusEvent.java b/src/libbluray/bdj/java/org/havi/ui/event/HFocusEvent.java
index b7411e7..5734fce 100644
--- a/src/libbluray/bdj/java/org/havi/ui/event/HFocusEvent.java
+++ b/src/libbluray/bdj/java/org/havi/ui/event/HFocusEvent.java
@@ -42,7 +42,9 @@ public class HFocusEvent extends java.awt.event.FocusEvent {
     }
 
     public int getTransferId() {
-        return transfer;
+        if (getID() == FOCUS_TRANSFER)
+            return transfer;
+        return NO_TRANSFER_ID;
     }
 
     private int transfer;
diff --git a/src/libbluray/bdj/java/org/havi/ui/event/HFocusListener.java b/src/libbluray/bdj/java/org/havi/ui/event/HFocusListener.java
index 52dffbb..7ced199 100644
--- a/src/libbluray/bdj/java/org/havi/ui/event/HFocusListener.java
+++ b/src/libbluray/bdj/java/org/havi/ui/event/HFocusListener.java
@@ -22,5 +22,4 @@ package org.havi.ui.event;
 import java.awt.event.FocusListener;
 
 public interface HFocusListener extends FocusListener {
-
 }
diff --git a/src/libbluray/bdj/java/org/havi/ui/event/HKeyListener.java b/src/libbluray/bdj/java/org/havi/ui/event/HKeyListener.java
index ce8d3b4..700b33b 100644
--- a/src/libbluray/bdj/java/org/havi/ui/event/HKeyListener.java
+++ b/src/libbluray/bdj/java/org/havi/ui/event/HKeyListener.java
@@ -22,5 +22,4 @@ package org.havi.ui.event;
 import java.awt.event.KeyListener;
 
 public interface HKeyListener extends KeyListener {
-
 }
diff --git a/src/libbluray/bdj/java/org/havi/ui/event/HMouseCapabilities.java b/src/libbluray/bdj/java/org/havi/ui/event/HMouseCapabilities.java
index ccf1024..74f9f8d 100644
--- a/src/libbluray/bdj/java/org/havi/ui/event/HMouseCapabilities.java
+++ b/src/libbluray/bdj/java/org/havi/ui/event/HMouseCapabilities.java
@@ -24,6 +24,6 @@ public class HMouseCapabilities {
     }
 
     public static boolean getInputDeviceSupported() {
-        return true;
+        return false;
     }
 }
diff --git a/src/libbluray/bdj/java/org/havi/ui/event/HRcCapabilities.java b/src/libbluray/bdj/java/org/havi/ui/event/HRcCapabilities.java
index 2dc03d6..812dd3a 100644
--- a/src/libbluray/bdj/java/org/havi/ui/event/HRcCapabilities.java
+++ b/src/libbluray/bdj/java/org/havi/ui/event/HRcCapabilities.java
@@ -34,7 +34,7 @@ public class HRcCapabilities extends HKeyCapabilities {
     public static HEventRepresentation getRepresentation(int keyCode) {
         if (!isSupported(keyCode))
             return null;
-        return new HEventRepresentation(true, getKeyText(keyCode), getKeyColor(keyCode), null);
+        return new HEventRepresentation(getKeyText(keyCode), getKeyColor(keyCode), null);
     }
 
     public static boolean getInputDeviceSupported() {
@@ -71,7 +71,7 @@ public class HRcCapabilities extends HKeyCapabilities {
             case HRcEvent.VK_BASS_BOOST_UP:
                 return "Bass Boost Up";
             case HRcEvent.VK_CHANNEL_DOWN:
-                return "Channel DOwn";
+                return "Channel Down";
             case HRcEvent.VK_CHANNEL_UP:
                 return "Channel Up";
             case HRcEvent.VK_CLEAR_FAVORITE_0:



More information about the libbluray-devel mailing list