The TableElement isn't fully implemented yet, but that should be up sometime soon. A HyperTextElement and ImageElement are created with the tools in the toolbar right next to the navigation buttons. If there is something you find confusing about the interface I would like to hear. It's hard for me to see that kind of thing because I made it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What I means is that I want to add some other Elements which I interested in.
The other Elements very like the ImageElement,HyperTextElement,IndexElement. I want the otherElement which I interested in can be established and then display in the user interface of Hypernotes.For example , I want to add a widget or something,how to add it?
I should implement which functions or something else?
How can I do? Can you give me some advise or give me a demo for how to add a new *Element?
Thanks for your help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From some of your other posts it seems like you have already found out a lot on your own. If there are any specifics you would like me to elaborate on, let me know. I've been wanting to generate some kind of documentation that covers the structure of the program and how to make new kinds of elements and extend the program in other ways.
For a short explanation,
To make a new kind of element, you need to extend the NodeElement class and overwrite at least the abstract methods, which you proabably found out already. The HyperTextElement provides a lot of basic functionality, so you can start by subclassing that instead. For each new type of NodeElement, you need to make a NodeElementUI that is returned by createUI(). The toolbar button that selects the node is a NodeTool.ToggleButton. You will need to create a subclass of NodeTool that will create your NodeElement and add it to the Node. CreateHyperTextElementTool and CreateImageElementTool are good examples of this. DragBoxNodeTool is a subclass of NodeTool that makes life a little easier if you want draggable box selection to be part of the tool.
Also, I think I remember you asked about modifying the listener for hyperlinks. The MouseListener that processes hyperlinks is in the HyperEditorKit. I would look at the current implementation of the LinkListener in there to see how you want to go about modifying the functionality.
Hope this helps. I'll get some solid documentation up eventually. If there are any other details you want clarified just let me know.
I would be interested to hear about how you would like to extend the program and if you would be willing to contribute code to the project.
Cheers,
Jere
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can we add other java components to the user interface of our Hypernotes? For example ,adding a JRadioButton or a JCheckBox and so on to the interface . Can we implement this ?
And the other important thing is that our Hypernotes doesn't support the flash. Can we add a flash to this project.I think this is very necessary for a vivid Hypernote though there is a long way to go. I will do this. Hope you will too.
And the thought is changed every day. And I will contact with you once I have a new idear.
Cheers,
seeker1006
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are several places you can add your own components. Since the NodeElementUI returned by createUI() is a JPanel, you can put anything you want in the box that represents it in the Note display. There are also methods that allow you to add your own toolbar buttons, action-panel(lower right panel) controls, and menus. You can do this by calling addToolBarControl(JComponent), addActionPanelControl(String,JComponent), and addMenu(JMenu). (All of these are defined in the NodeElementUI class.) If you extend a NodeElementUI that already has toolbar/action-panel controls (Like HyperTextElementUI) and you want to clear them out, you can call clearToolBarControls(), etc. Take a look at the NodeElementUI class for the details. The string you pass to addActionPanelControl is the title that should appear above the collapsible panel containing your components. That string is also the key for storing it in a HashMap, so if you give it a name that already exists, it will replace the previous one, which may have undesired results.
Hope this is helpful. Keep the new ideas coming. I love to hear them.
Cheers,
Jere
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I add a **Element such as the TableElement,ImageElement ??
Thanks
The TableElement isn't fully implemented yet, but that should be up sometime soon. A HyperTextElement and ImageElement are created with the tools in the toolbar right next to the navigation buttons. If there is something you find confusing about the interface I would like to hear. It's hard for me to see that kind of thing because I made it.
And sorry about not responding to the previous posts... I need to check the forums more
Thanks for your replies!
What I means is that I want to add some other Elements which I interested in.
The other Elements very like the ImageElement,HyperTextElement,IndexElement. I want the otherElement which I interested in can be established and then display in the user interface of Hypernotes.For example , I want to add a widget or something,how to add it?
I should implement which functions or something else?
How can I do? Can you give me some advise or give me a demo for how to add a new *Element?
Thanks for your help!
From some of your other posts it seems like you have already found out a lot on your own. If there are any specifics you would like me to elaborate on, let me know. I've been wanting to generate some kind of documentation that covers the structure of the program and how to make new kinds of elements and extend the program in other ways.
For a short explanation,
To make a new kind of element, you need to extend the NodeElement class and overwrite at least the abstract methods, which you proabably found out already. The HyperTextElement provides a lot of basic functionality, so you can start by subclassing that instead. For each new type of NodeElement, you need to make a NodeElementUI that is returned by createUI(). The toolbar button that selects the node is a NodeTool.ToggleButton. You will need to create a subclass of NodeTool that will create your NodeElement and add it to the Node. CreateHyperTextElementTool and CreateImageElementTool are good examples of this. DragBoxNodeTool is a subclass of NodeTool that makes life a little easier if you want draggable box selection to be part of the tool.
Also, I think I remember you asked about modifying the listener for hyperlinks. The MouseListener that processes hyperlinks is in the HyperEditorKit. I would look at the current implementation of the LinkListener in there to see how you want to go about modifying the functionality.
Hope this helps. I'll get some solid documentation up eventually. If there are any other details you want clarified just let me know.
I would be interested to hear about how you would like to extend the program and if you would be willing to contribute code to the project.
Cheers,
Jere
Very thank you for help.
What you said is just what I want to know.
Can we add other java components to the user interface of our Hypernotes? For example ,adding a JRadioButton or a JCheckBox and so on to the interface . Can we implement this ?
And the other important thing is that our Hypernotes doesn't support the flash. Can we add a flash to this project.I think this is very necessary for a vivid Hypernote though there is a long way to go. I will do this. Hope you will too.
And the thought is changed every day. And I will contact with you once I have a new idear.
Cheers,
seeker1006
There are several places you can add your own components. Since the NodeElementUI returned by createUI() is a JPanel, you can put anything you want in the box that represents it in the Note display. There are also methods that allow you to add your own toolbar buttons, action-panel(lower right panel) controls, and menus. You can do this by calling addToolBarControl(JComponent), addActionPanelControl(String,JComponent), and addMenu(JMenu). (All of these are defined in the NodeElementUI class.) If you extend a NodeElementUI that already has toolbar/action-panel controls (Like HyperTextElementUI) and you want to clear them out, you can call clearToolBarControls(), etc. Take a look at the NodeElementUI class for the details. The string you pass to addActionPanelControl is the title that should appear above the collapsible panel containing your components. That string is also the key for storing it in a HashMap, so if you give it a name that already exists, it will replace the previous one, which may have undesired results.
Hope this is helpful. Keep the new ideas coming. I love to hear them.
Cheers,
Jere