45 |
import java.awt.event.WindowEvent; |
import java.awt.event.WindowEvent; |
46 |
import java.beans.PropertyChangeEvent; |
import java.beans.PropertyChangeEvent; |
47 |
import java.beans.PropertyChangeListener; |
import java.beans.PropertyChangeListener; |
|
import java.io.IOException; |
|
|
import java.io.ObjectOutputStream; |
|
48 |
import java.io.Serializable; |
import java.io.Serializable; |
49 |
import java.util.EventListener; |
import java.util.EventListener; |
50 |
|
|
135 |
this(text); |
this(text); |
136 |
} |
} |
137 |
|
|
|
private void writeObject(ObjectOutputStream stream) throws IOException |
|
|
{ |
|
|
} |
|
|
|
|
138 |
/** |
/** |
139 |
* Adds specified menu item to this menu |
* Adds specified menu item to this menu |
140 |
* |
* |
762 |
*/ |
*/ |
763 |
protected void processKeyEvent(KeyEvent event) |
protected void processKeyEvent(KeyEvent event) |
764 |
{ |
{ |
765 |
|
// TODO: Implement this properly. |
766 |
} |
} |
767 |
|
|
768 |
/** |
/** |
807 |
return accessibleContext; |
return accessibleContext; |
808 |
} |
} |
809 |
|
|
810 |
|
// FIXME: This inner class is a complete stub and needs to be implemented. |
811 |
protected class AccessibleJMenu extends AccessibleJMenuItem |
protected class AccessibleJMenu extends AccessibleJMenuItem |
812 |
implements AccessibleSelection |
implements AccessibleSelection |
813 |
{ |
{ |
815 |
|
|
816 |
protected AccessibleJMenu() |
protected AccessibleJMenu() |
817 |
{ |
{ |
818 |
|
// Nothing to do here. |
819 |
} |
} |
820 |
|
|
821 |
public int getAccessibleChildrenCount() |
public int getAccessibleChildrenCount() |
855 |
|
|
856 |
public void addAccessibleSelection(int value0) |
public void addAccessibleSelection(int value0) |
857 |
{ |
{ |
858 |
|
// TODO: Implement this properly. |
859 |
} |
} |
860 |
|
|
861 |
public void removeAccessibleSelection(int value0) |
public void removeAccessibleSelection(int value0) |
862 |
{ |
{ |
863 |
|
// TODO: Implement this properly. |
864 |
} |
} |
865 |
|
|
866 |
public void clearAccessibleSelection() |
public void clearAccessibleSelection() |
867 |
{ |
{ |
868 |
|
// TODO: Implement this properly. |
869 |
} |
} |
870 |
|
|
871 |
public void selectAllAccessibleSelection() |
public void selectAllAccessibleSelection() |
872 |
{ |
{ |
873 |
|
// TODO: Implement this properly. |
874 |
} |
} |
875 |
} |
} |
876 |
|
|
877 |
protected class WinListener extends WindowAdapter implements Serializable |
protected class WinListener extends WindowAdapter implements Serializable |
878 |
{ |
{ |
|
JPopupMenu popupMenu; |
|
879 |
private static final long serialVersionUID = -6415815570638474823L; |
private static final long serialVersionUID = -6415815570638474823L; |
880 |
|
|
881 |
|
/** |
882 |
|
* Creates a new <code>WinListener</code>. |
883 |
|
* |
884 |
|
* @param popup the popup menu which is observed |
885 |
|
*/ |
886 |
public WinListener(JPopupMenu popup) |
public WinListener(JPopupMenu popup) |
887 |
{ |
{ |
888 |
|
// TODO: What should we do with the popup argument? |
889 |
} |
} |
890 |
|
|
891 |
|
/** |
892 |
|
* Receives notification when the popup menu is closing and deselects |
893 |
|
* the menu. |
894 |
|
* |
895 |
|
* @param event the window event |
896 |
|
*/ |
897 |
public void windowClosing(WindowEvent event) |
public void windowClosing(WindowEvent event) |
898 |
{ |
{ |
899 |
|
setSelected(false); |
900 |
} |
} |
901 |
} |
} |
902 |
|
|