Dimas Danurwenda Posted via mailing list.
|
Posted: Thu Apr 12, 2012 3:05 am Post subject: [platform-dev] Re: Screen concept in RCP applications |
|
|
Is it similar to layering, grouping, and visibility in, say, Photoshop? I'm looking for that too, and currently I'm exploring the Visual Library with no clue.
On Thu, Apr 12, 2012 at 4:09 AM, Javier Ortiz <address-removed ([email]address-removed[/email])> wrote:
| Quote: | | Is there some kind of screen concept in an RCP application? Screen being a group of components displayed at the same time I can work with via an API. |
|
| Back to top |
|
 |
Milo Posted via mailing list.
|
Posted: Thu Apr 12, 2012 8:18 am Post subject: [platform-dev] Re: Screen concept in RCP applications |
|
|
Hi,
don't you think TopComponentGroup?
It has open() and close() methods.
------------ Původní zpráva ------------
Od: Javier Ortiz <address-removed>
Předmět: [platform-dev] Screen concept in RCP applications
Datum: 11.4.2012 23:10:20
----------------------------------------
Is there some kind of screen concept in an RCP application? Screen being a
group of components displayed at the same time I can work with via an API.
I was planning of defining some type of class holding a list of components
and hide or show them accordingly to some methods. Any work done around
this that someone can share experiences on?
Thanks in advance! |
|
| Back to top |
|
 |
Geertjan Wielenga Posted via mailing list.
|
Posted: Thu Apr 12, 2012 8:39 am Post subject: [platform-dev] Re: Screen concept in RCP applications |
|
|
Or use roles.
http://platform.netbeans.org/whatsnew/71.html
Gj
On 04/12/2012 09:56 AM, Miloš Šilhánek wrote:
| Quote: | Hi,
don't you think TopComponentGroup?
It has open() and close() methods.
------------ Původní zpráva ------------
Od: Javier Ortiz<address-removed>
Předmět: [platform-dev] Screen concept in RCP applications
Datum: 11.4.2012 23:10:20
----------------------------------------
Is there some kind of screen concept in an RCP application? Screen being a
group of components displayed at the same time I can work with via an API.
I was planning of defining some type of class holding a list of components
and hide or show them accordingly to some methods. Any work done around
this that someone can share experiences on?
Thanks in advance!
|
|
|
| Back to top |
|
 |
javydreamercsw
Joined: 22 Jun 2009 Posts: 456
|
Posted: Thu Apr 12, 2012 11:40 am Post subject: [platform-dev] Re: Screen concept in RCP applications |
|
|
| Roles sounds to be the answer. I'll dive into that. Thanks! |
|
| Back to top |
|
 |
Gregg Wonderly Posted via mailing list.
|
Posted: Thu Apr 12, 2012 2:16 pm Post subject: [platform-dev] Re: Screen concept in RCP applications |
|
|
On 4/11/2012 9:44 PM, Dimas Danurwenda wrote:
| Quote: | Is it similar to layering, grouping, and visibility in, say, Photoshop? I'm
looking for that too, and currently I'm exploring the Visual Library with no clue.
On Thu, Apr 12, 2012 at 4:09 AM, Javier Ortiz <address-removed
<mailto:address-removed>> wrote:
Is there some kind of screen concept in an RCP application? Screen being a
group of components displayed at the same time I can work with via an API.
I was planning of defining some type of class holding a list of components
and hide or show them accordingly to some methods. Any work done around
this that someone can share experiences on?
Thanks in advance!
|
The AWT CardLayoutManager lets you flip between different "panes" or "cards"
where you only want to show one at at a time.
JPanel p = new JPanel();
CardLayoutManager cards = new CardLayoutManager();
p.setLayoutManager( cards );
p.add( pane1, "pane1" );
p.add( pane2, "pane2" );
p.add( pane3, "pane3" );
...
cards.show( "pane1", p );
Gregg Wonderly |
|
| Back to top |
|
 |
Javier Ortiz Posted via mailing list.
|
Posted: Tue Apr 17, 2012 7:03 pm Post subject: [platform-dev] Re: Screen concept in RCP applications |
|
|
That works perfectly to displaying the buttons and selecting from there. What I'm having issues figuring out is how to display one by default. I had that done making the components opening at start up but I would like to do that based on the role.
Based on the javadoc: http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowManager.html#setRole(java.lang.String)
The roles need to be defined in the Windows2/Roles folder. So I did that change but still they don't show. Debugging I see the role being set. I was expecting to see a layer entry being generated for the rols I created but found none during project build so I think that's part of the issue. How can I register the roles? Hopefully when they are registered it'll work.
Here's my role definition:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
<folder name = "Windows2">
<folder name = "Roles">
<file name = "game_view">
<attr name="position" intvalue="20"/>
<attr name="actionListener" newvalue="dreamer.card.game.gui.GameViewer"/>
</file>
<file name = "deck_view">
<attr name="position" intvalue="30"/>
<attr name="actionListener" newvalue="dreamer.card.game.gui.DeckViewer"/>
</file>
</folder>
</folder>
</filesystem>
And the layer generation entries:
Note: generated layer entry: Actions/Window/dreamer-card-game-gui-CollectionWindowTopComponent.instance
Note: generated layer entry: Actions/Window/dreamer-card-game-gui-DeckViewer.instance
Note: generated layer entry: Actions/Window/dreamer-card-game-gui-GameViewer.instance
Note: generated layer entry: Menu/Window/dreamer-card-game-gui-CardViewerTopComponent.shadow
Note: generated layer entry: Menu/Window/dreamer-card-game-gui-CollectionWindowTopComponent.shadow
Note: generated layer entry: Menu/Window/dreamer-card-game-gui-TableViewTopComponent.shadow
Note: generated layer entry: Windows2/Components/CardViewerTopComponent.settings
Note: generated layer entry: Windows2/Components/CollectionWindowTopComponent.settings
Note: generated layer entry: Windows2/Components/TableViewTopComponent.settings
Note: generated layer entry: Windows2/Modes/editor/TableViewTopComponent.wstcref
Note: generated layer entry: Windows2/Modes/explorer/CardViewerTopComponent.wstcref
Note: generated layer entry: Windows2/Modes/rightSlidingSide/CollectionWindowTopComponent.wstcref
Note: generated layer entry: xml/entities/dreamer_card_game_gui/CardViewer
Note: generated layer entry: xml/entities/dreamer_card_game_gui/CollectionWindow
Note: generated layer entry: xml/entities/dreamer_card_game_gui/TableView
Note: generated layer entry: xml/lookups/dreamer_card_game_gui/CardViewer.instance
Note: generated layer entry: xml/lookups/dreamer_card_game_gui/CollectionWindow.instance
Note: generated layer entry: xml/lookups/dreamer_card_game_gui/TableView.instance
Note: generated layer entry: xml/memory/dreamer/card/game/gui/CardViewerTopComponent
Note: generated layer entry: xml/memory/dreamer/card/game/gui/CollectionWindowTopComponent
Note: generated layer entry: xml/memory/dreamer/card/game/gui/TableViewTopComponent
Senior Software Quality Engineer
ArthroCare Corporation
7000 William Cannon Drive
Austin, TX 78735
Phone: 512-358-5996
email: address-removed
-----Original Message-----
From: Geertjan Wielenga [mailto:address-removed]
Sent: Thursday, April 12, 2012 10:40 AM
To: address-removed
Subject: [platform-dev] Re: Screen concept in RCP applications
On 04/12/2012 01:18 PM, Javier Ortiz wrote:
| Quote: | Roles sounds to be the answer. I'll dive into that. Thanks!
|
Attached is probably what you're looking for.
Gj
**********
The information contained in this e-mail message, together with any
attachments thereto, is intended only for the personal and confidential
use of the addressee named above. The message and the attachments
are or may be privileged or protected communication. If you are not the
intended recipient of this message, or authorized to receive it for the
intended recipient, you have received this message in error, and you
are not to review, use, disseminate, distribute or copy this message,
any attachments thereto, or their contents. If you have received this
message in error, please immediately notify us by return e-mail
message, and delete the original message.
Pursuant to Circular 230 issued by the United States Treasury
Department and relating to practice before the Internal Revenue
Services, any comment or opinion in this communication relating to a
federal tax issue is not intended to be used, and cannot be used, by a
taxpayer for the purpose of avoiding tax-related penalties that may be
imposed on the taxpayer. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|