Results 1 to 20 of 37
- 03-10-2009, 03:56 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
- 03-12-2009, 12:07 PM #2
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
I made a window only with a View. But further I do not manage. Can someone help me?
I must make 4 "Views" : one to the left of (0.18f), 3 rechts(0.18f; 0.5f; 0.04f)
Thanks
- 03-24-2009, 10:58 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
Hi,
Make 4 views from plugin.xml then
add these view to perspective of ur rcp project
public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.setFixed(true);
layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 0.2f, editorArea);
layout.addStandaloneView("testproject.view1", false, IPageLayout.TOP, 0.2f, editorArea);
layout.addStandaloneView("testproject.view2", false, IPageLayout.LEFT, 0.2f, editorArea);
}
}
Regards ,
vinay
- 03-27-2009, 09:31 AM #4
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
Thank you for the answer. I have tried but I didn't had success. Can you make an working example and upload it her (modify my application from archive)?
Thanks,
Regards,
Dan
- 03-30-2009, 06:22 AM #5
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
Send me the code of ur perspective.class n plugin.xml , I will make changes for u . Have u done entry of views in plugin.xml.
Regards,
trax
- 03-30-2009, 09:59 AM #6
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
Hi, I have tried but it is not working.
Code for perspective.class
Code for plugin.xmlJava Code:package howdyrcp; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IFolderLayout; import org.eclipse.ui.IPerspectiveFactory; public class Perspective implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); layout.setEditorAreaVisible(false); layout.setFixed(true); //layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 1.0f, editorArea); layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 0.18f, editorArea); } }
Java Code:<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.2"?> <plugin> <extension id="application" point="org.eclipse.core.runtime.applications"> <application> <run class="howdyrcp.Application"> </run> </application> </extension> <extension point="org.eclipse.ui.perspectives"> <perspective name="Perspective" class="howdyrcp.Perspective" id="HowdyRCP.perspective"> </perspective> </extension> <extension point="org.eclipse.ui.views"> <view name="View" class="howdyrcp.View" id="HowdyRCP.view"> </view> </extension> <extension id="product" point="org.eclipse.core.runtime.products"> <product application="HowdyRCP.application" name="Howdy RCP Application"> <property name="windowImages" value="icons/alt_window_16.gif,icons/alt_window_32.gif"> </property> </product> </extension> </plugin>
If you have Eclipse you can use the projekt from the archive.
Thank's
Dan
- 03-30-2009, 10:11 AM #7
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
Change the perspective classs:
package howdyrcp;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPerspectiveFactory;
public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.setFixed(true);
layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 0.18f, editorArea);
layout.addStandaloneView("HowdyRCP.view1", false, IPageLayout.TOP, 0.2f, editorArea);
layout.addStandaloneView("HowdyRCP.view2", false, IPageLayout.LEFT, 0.2f, editorArea);
}
}
- 03-30-2009, 10:12 AM #8
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
change the plugin.xml text to:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="howdyrcp.Application">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
name="Perspective"
class="howdyrcp.Perspective"
id="HowdyRCP.perspective">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="View"
class="howdyrcp.View"
id="HowdyRCP.view">
</view>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="View1"
class="howdyrcp.View1"
id="HowdyRCP.view1">
</view>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="View2"
class="howdyrcp.View2"
id="HowdyRCP.view2">
</view>
</extension>
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application="HowdyRCP.application"
name="Howdy RCP Application">
<property
name="windowImages"
value="icons/alt_window_16.gif,icons/alt_window_32.gif">
</property>
</product>
</extension>
</plugin>
- 03-30-2009, 10:14 AM #9
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
and add two classes in ur source code in howdyrcp package as View1 n View2 n copy the code written in howdyrcp.View In both of the classes.
If u hav more problems , feel free to contact.
Regards,
trax
- 03-30-2009, 10:19 AM #10
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
It's not working. By compiling I obtain only one view.
- 03-30-2009, 10:38 AM #11
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
It's working. Was my mistake.
Thank's
Regards
Dan
- 03-30-2009, 11:27 AM #12
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
Similarly U can add as many views in different forms in ur perspective.
- 03-30-2009, 12:39 PM #13
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
Thank you. With your help I have finished the first step.
Further I have to add a dynamic help to this RCP example.
I have to activate the help with "F1" and when I click one the one view appear the message for the selected view, when i click into other view i have to become the text help for the selected view.
I know that it is another thema but you know to work with Eclipse and you are the only who had posted an answer to my questions.
When do you know something that can help me, or you know how to do this, please help me.
Best regards ,
Dan
- 03-30-2009, 01:20 PM #14
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
I can help u but plz be more specific with ur requirements , I m nt able to understand what u want , i just understanded that u want that help should be activated when u press F1 but what kind of help do u want to open any dialog box for it or in another form plz expalin:)
regards,
trax
- 03-30-2009, 01:28 PM #15
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
I have to make something that looks an works similar with dynamic help from Eclipse. When you open the Eclipse and press F1 appear a window with related topics. When you select for example package explorer in the help window appear "about package explorer" and so works for others view from Eclipse.
For my application i have to buid a such dynamic help. I hope that I have good explained.
Thanks
Dan
- 03-30-2009, 02:00 PM #16
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
This code will solve ur problem:)
parent.addKeyListener(new KeyAdapter(){
@Override
public void keyPressed(KeyEvent event) {
if(event.keyCode == SWT.F1){
// Your code
}
}
});
- 03-30-2009, 02:05 PM #17
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
Where I have to add this code?
Dan
- 03-30-2009, 02:16 PM #18
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
1st u tell me what widgets you including in ur views.
trax
- 03-30-2009, 02:48 PM #19
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
Try this out :)
public void createPartControl(Composite parent) {
parent.getShell().addKeyListener(new KeyAdapter(){
@Override
public void keyPressed(KeyEvent event) {
if(event.keyCode==SWT.F1){
//your code
}
}
});
}
regards,
trax
- 03-30-2009, 02:50 PM #20
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
Similar Threads
-
User Interface
By swikar.java in forum Advanced JavaReplies: 16Last Post: 12-09-2008, 02:37 PM -
Multiple line user input
By jointhelabel in forum New To JavaReplies: 3Last Post: 10-26-2008, 02:41 AM -
J2ME User Interface Developer
By mobileapps in forum Jobs OfferedReplies: 0Last Post: 10-03-2008, 12:43 PM -
user interface development using JSP
By pradeep1_mca@yahoo.com in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 06-02-2008, 01:48 PM -
Help user interface
By carl in forum New To JavaReplies: 1Last Post: 07-31-2007, 07:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks