Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / src / javajs / api / SC.java
1 package javajs.api;
2
3 /**
4  * SwingComponent interface common to javax.swing and javajs.swing
5  * 
6  * Can be augmented as needed, provided classes of javajs.swing are also
7  * updated. (SwingComponents in javajs are subclasses of AbstractButton.)
8  * 
9  */
10
11 public interface SC {
12
13   void add(SC item);
14
15   void addActionListener(Object owner);
16
17   void addItemListener(Object owner);
18
19   void addMouseListener(Object owner);
20
21   String getActionCommand();
22
23   Object getComponent(int i);
24
25   int getComponentCount();
26
27   Object[] getComponents();
28
29   String getName();
30
31   Object getParent();
32
33   Object getPopupMenu();
34
35   Object getIcon();
36
37   String getText();
38
39   void init(String text, Object icon, String actionCommand, SC popupMenu);
40
41   void insert(SC subMenu, int index);
42
43   boolean isEnabled();
44
45   boolean isSelected();
46
47   void remove(int i);
48
49   void removeAll();
50
51   void setActionCommand(String script);
52
53   void setAutoscrolls(boolean b);
54
55   void setEnabled(boolean enable);
56
57   void setIcon(Object icon);
58
59   void setName(String string);
60
61   void setSelected(boolean state);
62
63   void setText(String entry);
64
65 }