AS3: Constant tab moved to the top

AS3: Empty namespaces shown as "-"
This commit is contained in:
Jindra Pet��k
2011-12-27 08:35:11 +01:00
parent d67e7660ef
commit 70ac6d3308
4 changed files with 20 additions and 7 deletions
+2 -1
View File
@@ -250,7 +250,7 @@ public class ABC {
}
bodies[i].traits = ais.readTraits();
}
}
}
public void saveToStream(OutputStream os) throws IOException {
ABCOutputStream aos = new ABCOutputStream(os);
@@ -367,6 +367,7 @@ public class ABC {
String name = m.getName(constants);
if (ns != null) {
String newimport = ns.getName(constants);
if(newimport.equals("-")) newimport="";
if (!newimport.equals("")) {
newimport += "." + name;
if (newimport.contains(":")) {
@@ -203,13 +203,22 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener {
navigator = new TraitsList();
navigator.setABC(abc);
JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.addTab("Traits", new JScrollPane(navigator));
JPanel navPanel=new JPanel(new BorderLayout());
JLabel traitsLabel=new JLabel("Traits");
navPanel.add(traitsLabel,BorderLayout.NORTH);
traitsLabel.setBorder(new BevelBorder(BevelBorder.RAISED));
navPanel.add(navigator,BorderLayout.CENTER);
splitPane2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
new JScrollPane(classTree = new ClassesListTree(abc)),
tabbedPane);
navPanel);
pan2.add(splitPane2, BorderLayout.CENTER);
JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.addTab("Classes", splitPane2);
pan2.add(tabbedPane, BorderLayout.CENTER);
abcComboBox.addItemListener(this);
@@ -109,10 +109,10 @@ public class NamespaceTableModel implements TableModel {
case 0:
return rowIndex;
case 1:
if (rowIndex == 0) return "";
if (rowIndex == 0) return "-";
return abc.constants.constant_namespace[rowIndex].getKindStr();
case 2:
if (rowIndex == 0) return "";
if (rowIndex == 0) return "-";
return abc.constants.constant_namespace[rowIndex].getName(abc.constants);
default:
return null;
@@ -74,6 +74,9 @@ public class Namespace {
}
public String getName(ConstantPool constants) {
if(name_index==0){
return "-";
}
return constants.constant_string[name_index];
}
}