Displaying GridValueLayer styles in Repast Simphony 2.3.1? - java

Repast Simphony 2.0-beta had a known issue with specifying value layer styles.
The option to display them did not show up in the GUI interface.
In the GUI, right-clicking on a display and selecting 'Edit', should open a window several tabs along the left side:
General
Agent Selection
Agent Style
Grid Style
Value Layer Details and
Schedule Details
With the bug, the "Value Layer Details" tab does not show up, so it is not possible to set the ValueLayer Style and see the state of the layer.
Is that bug fixed by default in version 2.3.1? I am having a similar problem. The tab does not show up.
My question is is this the same problem or something else and how do I fix it?
Solution to the original problem
The problem was fixed by downloading three .class files, Nick Collier attached to an email on the Repast mailing list, to the folder:
Repast-Simphony-2.0.0-beta/eclipse/plugins/repast.simphony.visualization_2.0.0/bin/repast/simphony/visualization/gui
An example where it works
Repast StupidModel, which was hosted on Google Code, has an example where the option shows up. That model was built with an earlier version of Repast. I have tried to replicate their implementation of the ValueLayer and style sheets.

The bug is fixed.
Adding this line to the file context.xml makes the option show up in the GUI:
<projection id="foodValueLayer" type="value layer" />

Related

Intellij UI Designer: Reload Custom Component Button does not show up

I am currently completely stuck with the following problem: I want an GUI with a cotrol panel at the right to type in some program parameters that should be used to draw multiple lines onto a graphic panel at the left side of my GUI. My approach was to use the Form Designer to arrange the Layout with all the Buttons, Lables and TextFields. Than I created a Class "GraphicPanel" that extends JPanel and I overrided the PaintComponent method of this class in order to draw the lines.
Now I want to add this custom created component via the form Designer to my UI. But when I try this via the Non-Palette-Component option: nothing happens and the component is not even shown in the hierarchy-tree. I have already serached the web for solutions and found that my class needs to be compiled and the ReloadCustomComponents-Button must be clicked after inserting custom stuff. My class is compiled but the ReloadCustomComponents-Button is not shown up in the UI-Designer Toolbar. I tried to configure the toolbar manually - and in the configuration setup Intellij is also listing the Button as a displayed icon - but it is not there when I apply the configuration. Did anyone had the same problem or does anyone have any suggestions what I can try or what else I can check out? I am actually wondering if this is a software bug or whether I missed something different. I am quite a beginner and especially working with UI's and Swing is new for me so I have no real idea how to go on with this. Thanks for any help!
(I am using Intellij Idea 2020.3.1 on Windows and JDK 15.0.1 and my output format for the UI-form code is set to binary class files)
UI component classes used in the UI Designer palette must be compiled for the same or lower Java target version as is used to run IntelliJ IDEA. IDE JDK version is available in Help | About dialog and is 11 for 2020.x IDE versions.
Change the target JDK version to 11 so that IDE can load the component classes. See this answer for the relevant places where JDK language levels are configured.

RCP Start the product with Clear Workspace

So I've come across this weird bug in RCP Apps.
I've created a new RCP App with the Mail Template. I've added a new org.eclipse.ui.menus extension with a menuContribution with locationURI:toolbar:org.eclipse.ui.main.toolbar. To that, I've added a command with a little icon.
Now, if I start the app without Clear Workspace in the Debug Configurations, my action appears AFTER the Quick Access text widget. Not only that, but a few other bugs come along (e.g. views aren't closing, too many views are opening at once). This is not a one-time thing, i.e. I have to start the app with Clear Workspace each time.
This method of adding actions on the coolBar is non-deprecated. Why does it behave like a spoiled brat?
Without Clear Workspace:
With Clear Workspace:
There is a long discussion on the Eclipse forums about this here with a bug filed as a result here.
The bug is not scheduled to be fixed until Eclipse 4.4M5 but using one of the workarounds to remove the Quick Access control discussed here should help.

Netbeans Platform: Hide Tabs for just one TopComponent

netbeans platform has proved to be most useful for large applications. But what about small applications?
I'm building a small Price-List making software which only has one TopComponent which contains a JTable and a few buttons.
This component I've set to have closing/sliding etc disabled as this is mandatory to be there. I also DO NOT want to have ANY more top components.
Is there a way to remove the tabs? It seems pointles to show just one tab with the name of the TopComponent.
I hope you get what I mean!
Thanks in advance.
Molten Ice,
Geertjan Wielenga's blog is an invaluable source of information for the NetBeans Platform. He's written a post especially for this task:
http://blogs.oracle.com/geertjan/entry/farewell_to_space_consuming_weird
I've used this technique before and it works fine.
If you have any other questions related to the NetBeans Platform I would suggest that you try the Plaform Users section of the NetBeans forums.

Eclipse text-editor drag-and-drop mouse click key combination

In the Java source editor in Eclipse, you could select a block of code, pick it with a mouse click and drop the block of code into another area of the code.
You can't do that for other text editors like XML, HTML, etc. I had to press a key combination before I could use the mouse to move and drop the selected text. I have a new Eclipse set-up now and I can't recall what the key combination is. I tried ctrl-shift, ctrl-alt, alt-shift, and ctrl-shift-alt. None of them work. I had drag-and-drop enabled.
Is there something else on Eclipse that I had installed in my old Eclipse set-up that I forgot to install in my new Eclipse set-up? It shouldn't be because the text editor config has a check box for "enable drag and drop" which I enabled.
Of course, if you are one of those guys who wrote the eclipse text editor, you should also answer this question:
why did you not make the other text editors behave like the Java code editor? Why did you make us into having to do a key-combination to perform drag and drop for the other editors? What's wrong with having all the editors exhibit the same behaviour?
I woogled and googled and could not find any eclipse manual that would tell me what the key combination is. I also could not find it in the local help files. If you required us to use key-combination, why did you not document that in a manual?
My apologies, but I realise I sound a little frustrated now.
The text DnD (Drag and Drop) feature (initially introduced by bug 11624 in 2007) has been slowly extended to various editors, as reported by the bug 231294:
Tested in EclipsePdt-2.2.0.v20100427
Verified fixed for:
PHP files
JS files
Still reproducible in:
CSS files
HTML files
XML files (source view)
So it is still "work in progress".
The relevant blocking issues are:
bug 178104: [DND] Need to revisit dnd API to allow multiple drop targets
bug 173405 Make use of IDragAndDropService (Show Votes)
bug 195655 Drag'n'drop selected text

How do you add a button to the email message window toolbar in Lotus Notes 8.5+?

A coworker has been struggling with this problem.
The desired result is an installable plugin for Notes that will add a button emails with attachments that will let users save the attachment to a document management system.
Finding documentation on doing this for Notes has been an uphill battle to say the least.
Writing the actual java to do the work isn't a problem, but figuring out how to extend Notes is.
So, is there a way to add a button/icon to the toolbar, or is it just a matter of adding a new toolbar? If we add a new toolbar then can we make it only visible (or just grey it out otherwise) when no email is open?
Both Lotus Notes 8+ and Lotus Symphony use the IBM Lotus Expeditor Toolkit.
If you get the Lotus Symphony SDK here.
Their are one or two examples dealing with adding button's to the symphony toolbar.
They should translate almost identically to Notes.
Good Luck,
Brian Gianforcaro
I had to do this once in Notes for a plugin I was developing. What I ended up doing was editing the Notes template in the designer, and then writing some LotusScript behind it that called a .NET class via a DLL. So when you clicked the button, it triggered the event in the LotusScript, and then called the DLL, and passed the item information to it.
I should also note that it was a freakin' bear to figure out because Notes documentation is terrible.
Depending on what access you have to the system the task can be fairly easy. Typically you customize your mail template to include a button in the inbox folder and the all documents view (for safety precautions see this entry). You customize ($Inbox) ($All) if you want to have the buttons only on the view level or additionaly the forms (there is a shared header subform you can use.
Give the button a meaningful label and add this code:
#Command([ToolsRunMacro];"(ExportDocumentsTo[yourSystemNameHere])")
The round brackets are actually important. Your code (Java I presume) the goes into an agent. You select "Create Agent" and Java as language. You specify "selected documents" to run against and agent list selection as trigger (this puts the () around your name). You can can get them from the Session class.
If your users are ok using a menu instead of a button you can simply select Action list as trigger and the agent will be listed in the action menu.
From your question I gather you want this for the Eclipse client. Please peruse Mikkel Heisterberg's site LekkimWorld.com
It contains tons of material. Start by reading his presentations and search the site. It has a lot of useful material.

Categories

Resources