diff --git a/Java/idw-gpl.jar b/Java/idw-gpl.jar new file mode 100644 index 00000000..eda18680 Binary files /dev/null and b/Java/idw-gpl.jar differ diff --git a/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Program.java b/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Program.java index 0b2e9c2a..177d6f11 100644 --- a/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Program.java +++ b/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Program.java @@ -1,7 +1,5 @@ package net.alcetech.UniversalEditor; -import java.io.IOException; - import net.alcetech.Core.*; import net.alcetech.UniversalEditor.Windows.*; import net.alcetech.UserInterface.Theming.*; @@ -35,6 +33,38 @@ public class Program } */ + Command mnuFile = new Command("mnuFile", "_File"); + Command mnuEdit = new Command("mnuEdit", "_Edit"); + Command mnuView = new Command("mnuView", "_View"); + Command mnuProject = new Command("mnuProject", "_Project"); + Command mnuBuild = new Command("mnuBuild", "_Build"); + Command mnuDebug = new Command("mnuDebug", "_Debug"); + Command mnuTools = new Command("mnuTools", "_Tools"); + Command mnuWindow = new Command("mnuWindow", "_Window"); + Command mnuHelp = new Command("mnuHelp", "_Help"); + + mnuFile.getCommandCollection().add(new Command("mnuFileExit", "Exit")); + + Application.getCommandCollection().add(mnuFile); + Application.getCommandCollection().add(mnuEdit); + Application.getCommandCollection().add(mnuView); + Application.getCommandCollection().add(mnuProject); + Application.getCommandCollection().add(mnuBuild); + Application.getCommandCollection().add(mnuDebug); + Application.getCommandCollection().add(mnuTools); + Application.getCommandCollection().add(mnuWindow); + Application.getCommandCollection().add(mnuHelp); + + Application.addCommandListener(new ICommandListener() + { + @Override + public void onCommandExecuted(CommandEventArgs e) + { + // TODO Auto-generated method stub + System.out.println("Command '" + e.getCommand().getName() + "' executed!"); + } + }); + MarkupObjectModel mom = new MarkupObjectModel(); mom.getElementCollection().add(new MarkupTagElement("test", "honduras")); diff --git a/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Windows/MainWindow.java b/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Windows/MainWindow.java index 1639f3c9..45a0e265 100644 --- a/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Windows/MainWindow.java +++ b/Java/net.alcetech.UniversalEditor/src/net/alcetech/UniversalEditor/Windows/MainWindow.java @@ -1,6 +1,9 @@ package net.alcetech.UniversalEditor.Windows; import java.awt.BorderLayout; +import java.awt.Cursor; +import java.awt.MouseInfo; +import java.awt.Point; import java.awt.event.*; import javax.swing.*; @@ -10,33 +13,38 @@ import net.alcetech.UserInterface.*; import net.alcetech.UserInterface.Controls.*; import net.alcetech.UserInterface.Theming.ThemeManager; -public class MainWindow extends Window implements ActionListener +public class MainWindow extends Window { - private Ribbon ribbon = new Ribbon(); - - private JMenuItem mnuFileExit = new JMenuItem(); + private CommandBarContainer commandBarContainer = new CommandBarContainer(); + + private DockingWindowContainer dwc = new DockingWindowContainer(); private void InitializeComponent() { - this.add(this.ribbon); - this.setIconImages(ThemeManager.GetThemedIconImages("MainIcon")); this.setSize(800, 600); this.setTitle("Universal Editor"); - this.setLayout(new BorderLayout()); - - JMenu mnuFile = new JMenu(); - mnuFile.setText("File"); - mnuFile.setMnemonic('F'); - mnuFileExit.addActionListener(this); - mnuFileExit.setText("Exit");; - mnuFileExit.setMnemonic('x'); - mnuFileExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK)); - mnuFile.add(mnuFileExit); CommandBar cbMenuBar = new CommandBar(); - cbMenuBar.add(mnuFile); - this.add(cbMenuBar, BorderLayout.NORTH); + + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuFile")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuEdit")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuView")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuProject")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuBuild")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuDebug")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuTools")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuWindow")); + cbMenuBar.getCommandCollection().add(new CommandReferenceCommandItem("mnuHelp")); + + this.commandBarContainer.add(cbMenuBar, BorderLayout.NORTH); + + this.commandBarContainer.add(dwc, BorderLayout.CENTER); + + this.add(this.commandBarContainer); + + dwc.getWindowCollection().add("Start Page", new JTextArea()); + dwc.getWindowCollection().add("X11R2", new JButton()); } public MainWindow() @@ -64,12 +72,4 @@ public class MainWindow extends Window implements ActionListener } } } - - public void actionPerformed(ActionEvent evt) - { - if (evt.getSource() == mnuFileExit) - { - Application.Exit(); - } - } }