Permalink
Browse files

piano piano

  • Loading branch information...
1 parent 6404185 commit 32027ffb727676f0dcd3007250a11b4ecfc71e0e @danja committed Feb 21, 2011
View
@@ -29,8 +29,8 @@
<classpathentry kind="lib" path="lib/jena/wstx-asl-3.2.9.jar"/>
<classpathentry kind="lib" path="lib/jena/xercesImpl-2.7.1.jar"/>
<classpathentry kind="lib" path="lib/jena/xml-apis.jar"/>
- <classpathentry kind="lib" path="lib/swingx/swingx-1.6.jar"/>
<classpathentry kind="lib" path="lib/Filters.jar"/>
- <classpathentry kind="lib" path="lib/swingx/swingx-beaninfo-1.6.jar"/>
+ <classpathentry kind="lib" path="lib/swingx/swingx-beaninfo-1.6.2.jar"/>
+ <classpathentry kind="lib" path="lib/swingx/swingx-core-1.6.2.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Binary file not shown.
View
@@ -0,0 +1,17 @@
+ 100 files 173 text files.
+classified 173 filesDuplicate file check 173 files (151 known unique)Unique: 100 files 157 unique files.
+Counting: 100 38 files ignored.
+
+http://cloc.sourceforge.net v 1.09 T=0.5 s (240.0 files/s, 35068.0 lines/s)
+-------------------------------------------------------------------------------
+Language files blank comment code scale 3rd gen. equiv
+-------------------------------------------------------------------------------
+Java 93 1802 5363 5687 x 1.36 = 7734.32
+HTML 15 776 3 3446 x 1.90 = 6547.40
+XML 5 59 102 168 x 1.90 = 319.20
+CSS 1 20 13 56 x 1.00 = 56.00
+Bourne Shell 5 8 7 22 x 3.81 = 83.82
+Haskell 1 0 0 2 x 2.11 = 4.22
+-------------------------------------------------------------------------------
+SUM: 120 2665 5488 9381 x 1.57 = 14744.96
+-------------------------------------------------------------------------------
View
@@ -16,7 +16,7 @@
<http://purl.org/stuff/scute/selectedTab>
"0" ;
<http://purl.org/stuff/scute/sync>
- "false" ;
+ "true" ;
<http://purl.org/stuff/scute/textSaveDelay>
"4000" ;
<http://purl.org/stuff/scute/textSavePeriod>
@@ -0,0 +1,10 @@
+@prefix void: <http://rdfs.org/ns/void#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix dcterms: <http://purl.org/dc/terms/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix wv: <http://vocab.org/waiver/terms/norms> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
View
@@ -0,0 +1,20 @@
+Maps
+
+Endpoints
+* local URI
+* name
+* endpoint
+
+Vocabs
+* local URI
+* name
+* prefix
+* URI
+
+Queries
+* local URI/filename for query string
+* name/title
+* endpoint
+
+
+
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,13 +19,16 @@
public class ScuteIcons {
/** The Constant applicationIcon. */
- public static final Image applicationIcon;
-
+ public static final ImageIcon applicationIcon;
+ public static final ImageIcon rdfIcon;
+ public static final ImageIcon sparqlIcon;
static {
final ClassLoader loader = ScuteIcons.class.getClassLoader();
- ImageIcon icon = new ImageIcon(loader.getResource("org/hyperdata/resources/scute/logo.png"));
- applicationIcon = icon.getImage();
+ applicationIcon = new ImageIcon(loader.getResource("org/hyperdata/resources/scute/logo.png"));
+
+ rdfIcon = new ImageIcon(loader.getResource("org/hyperdata/resources/scute/rdf-logo-16x16.png"));
+ sparqlIcon = new ImageIcon(loader.getResource("org/hyperdata/resources/scute/sparql-16x16.png"));
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -85,8 +85,9 @@ public void windowClosing(WindowEvent we) {
public void restorePreviousState(Scute rdfEditor) {
System.out.println("Config.self.getSelectedTab()) ="
+ Config.self.getSelectedTab());
- rdfEditor.setSelectedTab(Config.self.getSelectedTab());
- rdfEditor.setSourceText(getSavedText());
+// rdfEditor.setSelectedTab(Config.self.getSelectedTab());
+// rdfEditor.setSourceText(getSavedText());
+
}
/**
@@ -11,6 +11,7 @@
package org.hyperdata.scute.main;
import java.awt.BorderLayout;
+import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
@@ -113,7 +114,7 @@ public static void main(String[] args) {
private final SourcePanel turtlePanel;
/** The tabs. */
- private final JTabbedPane tabs;
+// private final JTabbedPane tabs;
/** The tree panel. */
private final RdfTreePanel treePanel;
@@ -127,11 +128,16 @@ public static void main(String[] args) {
private OpenDialog openDialog;
+ private final CardPanel cardPanel;
+
/**
* Instantiates a new scute.
*/
public Scute() {
+ // FIXME restorePreviousState BROKEN - fix!
+ // TODO restorePreviousState BROKEN - fix!
+
// setSystemLookFeel();
// for bootstrapping/debugging
@@ -155,37 +161,56 @@ public Scute() {
panel = new JPanel(new BorderLayout());
panel.setPreferredSize(FRAME_SIZE);
- tabs = new JTabbedPane(SwingConstants.BOTTOM);
- panel.add(tabs, BorderLayout.CENTER);
+
+ // tabs = new JTabbedPane(SwingConstants.BOTTOM);
+
+ cardPanel = new CardPanel();
+ // panel.add(tabs, BorderLayout.CENTER);
+ panel.add(cardPanel, BorderLayout.CENTER);
+
turtlePanel = new SourcePanel("Turtle");
turtlePanel.addUserActivityListener(autoSave);
turtlePanel.setEditorKit(new HighlighterEditorKit("Turtle"));
turtlePanel.loadModel(Models.workingModel);
Document turtleDocument = turtlePanel.getDocument();
- tabs.addChangeListener(turtlePanel);
- tabs.addTab("Turtle", new JScrollPane(turtlePanel));
+
+// tabs.addChangeListener(turtlePanel);
+// tabs.addTab("Turtle", new JScrollPane(turtlePanel));
+
+ cardPanel.addChangeListener(turtlePanel);
+ cardPanel.add("Turtle", new JScrollPane(turtlePanel));
rdfxmlPanel = new SourcePanel("RDF/XML");
rdfxmlPanel.addUserActivityListener(autoSave);
rdfxmlPanel.loadModel(Models.workingModel);
rdfxmlPanel.setEditorKit(new HighlighterEditorKit("XML"));
Document rdfxmlDocument = turtlePanel.getDocument();
- tabs.addChangeListener(rdfxmlPanel);
- tabs.addTab("RDF/XML", new JScrollPane(rdfxmlPanel));
+// tabs.addChangeListener(rdfxmlPanel);
+// tabs.addTab("RDF/XML", new JScrollPane(rdfxmlPanel));
+
+ cardPanel.addChangeListener(rdfxmlPanel);
+ cardPanel.add("RDF/XML", new JScrollPane(rdfxmlPanel));
treePanel = new RdfTreePanel(Models.workingModel);
treePanel.addUserActivityListener(autoSave);
- tabs.addTab("Tree", treePanel); // treePanel has scroll?
+// tabs.addTab("Tree", treePanel); // treePanel has scroll?
+ // need change listener???
+ cardPanel.add("Tree", treePanel);
+
graphPanel = new GraphPanel(Models.workingModel);
graphPanel.addUserActivityListener(autoSave);
- tabs.addTab("Graph", graphPanel);
+// tabs.addTab("Graph", graphPanel);
+ // need change listener???
+ cardPanel.add("Graph", graphPanel);
+
systemPanel = new SystemPanel();
// systemPanel.addUserActivityListener(autoSave);
- tabs.addTab("System", new JScrollPane(systemPanel));
+// tabs.addTab("System", new JScrollPane(systemPanel));
+ cardPanel.add("System", new JScrollPane(systemPanel));
// tabs.setSelectedIndex(0);
final JPanel controlPanel = new JPanel(); // contains JToolBars
@@ -227,13 +252,16 @@ public Scute() {
statusPanel.add(validatorButton);
statusPanel.add(validatorPane);
+
+ TaskPanel taskPanel = new TaskPanel(cardPanel);
+ panel.add(taskPanel, BorderLayout.WEST);
/*
* FIXME validator, autosave must interrupt/be halted immediately on any
* actions only one can run at any given time make singleton?
*/
frame = new JFrame("Scute");
- frame.setIconImage(ScuteIcons.applicationIcon);
+ frame.setIconImage(ScuteIcons.applicationIcon.getImage());
frame.addWindowListener(autoSave);
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JMenuBar menuBar = new JMenuBar();
@@ -251,7 +279,9 @@ public Scute() {
// correctly
System.out.println("RESTORE");
autoSave.restorePreviousState(this);
- tabs.addChangeListener(autoSave); // so previous tab can be
+
+ cardPanel.addChangeListener(autoSave);
+ // tabs.addChangeListener(autoSave); // so previous tab can be
// restored, has to be here to
// miss initializing change to
// tab 0
@@ -264,23 +294,23 @@ public Scute() {
* @param index
* the new selected tab
*/
- public void setSelectedTab(int index) {
- System.out.println("setting tab = " + index);
- tabs.setSelectedIndex(index);
- }
+// public void setSelectedTab(int index) {
+// System.out.println("setting tab = " + index);
+// tabs.setSelectedIndex(index);
+// }
/**
* Gets the selected tab.
*
* @return the selected tab
*/
- public int getSelectedTab() {
- return tabs.getSelectedIndex();
- }
+// public int getSelectedTab() {
+// return tabs.getSelectedIndex();
+// }
- public String getSelectedTabTitle() {
- return tabs.getTitleAt(getSelectedTab());
- }
+// public String getSelectedTabTitle() {
+// return tabs.getTitleAt(getSelectedTab());
+// }
/*
* (non-Javadoc)
@@ -494,46 +524,47 @@ public void waitCursor(boolean wait) {
* @throws Exception
* the exception
*/
- public SourcePanel getCurrentSourcePanel() throws Exception {
- JScrollPane scroll = (JScrollPane) tabs.getSelectedComponent();
- // System.out.println("component = "+scroll);
- Object panel = scroll.getViewport().getView();
- if (panel instanceof SourcePanel)
- return (SourcePanel) panel;
- else
- throw new Exception("not a text panel");
- }
+// public SourcePanel getCurrentSourcePanel() throws Exception {
+//
+// JScrollPane scroll = (JScrollPane) tabs.getSelectedComponent();
+// // System.out.println("component = "+scroll);
+// Object panel = scroll.getViewport().getView();
+// if (panel instanceof SourcePanel)
+// return (SourcePanel) panel;
+// else
+// throw new Exception("not a text panel");
+// }
/**
* Sets the source text.
*
* @param savedText
* the new source text
*/
- public void setSourceText(String savedText) {
- try {
- getCurrentSourcePanel().setText(savedText);
- } catch (Exception e) {
- // ignore
- }
- }
+// public void setSourceText(String savedText) {
+// try {
+// getCurrentSourcePanel().setText(savedText);
+// } catch (Exception e) {
+// // ignore
+// }
+// }
/*
* (non-Javadoc)
*
* @see org.hyperdata.scute.swing.ToolsInterface#checkText()
*/
- @Override
- public void checkText() {
- try {
- String text = getCurrentSourcePanel().getText();
- String syntax = getCurrentSourcePanel().getSyntax();
- RdfUtils.stringToModel(text, Config.baseUri, syntax);
- } catch (Exception e) {
- System.out.println("INVALID");
- }
- System.out.println("VALID");
- }
+// @Override
+// public void checkText() {
+// try {
+// String text = getCurrentSourcePanel().getText();
+// String syntax = getCurrentSourcePanel().getSyntax();
+// RdfUtils.stringToModel(text, Config.baseUri, syntax);
+// } catch (Exception e) {
+// System.out.println("INVALID");
+// }
+// System.out.println("VALID");
+// }
public static void setSystemLookFeel() {
try {
Oops, something went wrong.

0 comments on commit 32027ff

Please sign in to comment.