This file is indexed.

/usr/share/pyshared/jpypex/swing/AbstractAction.py is in python-jpype 0.5.4.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from jpype import *;

class AbstractAction(object) :
    ACCELERATOR_KEY    = javax.swing.Action.ACCELERATOR_KEY
    ACTION_COMMAND_KEY = javax.swing.Action.ACTION_COMMAND_KEY
    DEFAULT            = javax.swing.Action.DEFAULT
    LONG_DESCRIPTION   = javax.swing.Action.LONG_DESCRIPTION
    MNEMONIC_KEY       = javax.swing.Action.MNEMONIC_KEY
    NAME               = javax.swing.Action.NAME
    SHORT_DESCRIPTION  = javax.swing.Action.SHORT_DESCRIPTION
    SMALL_ICON         = javax.swing.Action.SMALL_ICON
    
    def __init__(self, cb, name=None, icon=None) :
        object.__init__(self)
        
        self.__proxy = JProxy(javax.swing.Action, inst=self)
        self.__values = {}
        self.__cb = cb
        self.__listeners = []
        self.__enabled = True
        
        if name is not None :
            self.putValue(AbstractAction.NAME, name)
            
        if icon is not None :
            self.putValue(AbstractAction.SMALL_ICON, icon)
    
    proxy = property(lambda self : self.__proxy) 
    
    def addPropertyChangeListener(self, listener) :
        self.__listeners.append(listener)
        
    def getValue(self, key) :
        return self.__values.get(key, None)
          
    def isEnabled(self) :
        if self.__enabled :
            return True
        return False
          
    def putValue(self, key, value) :
        oldVal = self.__values.get(key, None)
        if oldVal != value :
            self.__values[key] = value
            self.__notify(key, oldVal, value)
          
    def removePropertyChangeListener(self,listener) :
        self.__listeners.remove(listener)
          
    def setEnabled(self,b) : 
        if (b and not self.__enabled) or ( not b and self.__enabled) :
            self.__enabled = b
            self.__notify("enabled", java.lang.Boolean(not b), java.lang.Boolean(b))  

    def actionPerformed(self, ev) :
        self.__cb(ev) 

    def __notify(self, k, oldVal, newVal) :
        ev = java.beans.PropertyChangeEvent(self.__proxy, k, oldVal, newVal)
        for i in self.__listeners :
            i.propertyChange(ev)