Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 42
Posts: 42   Pages: 5   [ Previous Page | 1 2 3 4 5 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 21698 times and has 41 replies Next Thread
prabath
Member
Member's Avatar


Joined: Dec 24, 2014
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

Hi Puybaret....

I'm bit stuck with one more thing. I was able to Add a button on tool bar as you said. I want to implement 3D view on/off function to that.

`Code in Applet Application

toolBar.addSeparator();
addActionToToolBar(homeView, HomeView.ActionType.TEST_BUTTON, toolBar);

Code in HomePane

createAction(ActionType.TEST_BUTTON, preferences, controller, "testMethod");

And Create a method in HomeControler

public void testMethod() {
System.out.println("Hi there.. I am the test method.. ");
is3DViewClicked = true;
View view = getHomeController3D().getView();

}


Once I press the button, the method is called. But I can't see the 3D view. Could you tell me how to view 3D panel ?

Thank You..
[Feb 8, 2015, 1:27:08 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

If you didn't create the 3D view as requested previously, don't be astonished that you can't manage it later!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Feb 9, 2015, 3:28:06 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
prabath
Member
Member's Avatar


Joined: Dec 24, 2014
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

The application which I developed using Sweet Home, is capable of detecting floor plan and drawing walls automatically. So If 3D view is enabled, system becomes slow.

Therefore I removed 3D view functionality and wanted to add a button to add 3D view functionality.
[Feb 10, 2015, 2:56:19 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

If you want to show/hide the 3D view, don't implement an other view factory to avoid its creation. Just make it invisible in the createHomeController method you overrode, and manage the divider of the JSplitPane grand parent of the 3D view when you show/hide the 3D view.

If you allow me , I would like to answer the questions which are publish in this forum and help the others.
Feel free to help other users! All help is welcomed. smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Feb 10, 2015, 10:19:48 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
prabath
Member
Member's Avatar


Joined: Dec 24, 2014
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

That's my issue. I couldn't find how to show/hide 3D pannel.
[Feb 10, 2015, 1:33:39 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

What about calling setVisible?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Feb 10, 2015, 1:59:54 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
prabath
Member
Member's Avatar


Joined: Dec 24, 2014
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

Hi Puybaret..

Can you pls explain bit more about the solution..?
[Feb 12, 2015, 6:48:36 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

In the current version, all classes that implement com.eteks.sweethome3d.viewcontroller.View interface are subclasses of javax.swing.JComponent. So cast 3D view to JComponent to be able to call its setVisible method.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Feb 12, 2015, 7:52:16 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
prabath
Member
Member's Avatar


Joined: Dec 24, 2014
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

Hi Puybaret..

I tried to fix my requirement as you said. Actually it is not clear to me. Anyway I found a solution to do that and mentioned below the code. Initially I set the 3D pane as 0.

HomePane - createMainPane Method

else {
final JSplitPane mainPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, catalogFurniturePane, planView3DPane);
// Set default divider location

mainPane.setDividerLocation(0);
configureSplitPane(mainPane, home, MAIN_PANE_DIVIDER_LOCATION_VISUAL_PROPERTY, 0.3, true, controller);
return mainPane;
}

Code for Button - Methods in HomeController.java

public void enable3DView() {

View vv = getHomeController3D().getView();
attachView(vv);

show3DView(vv);
}

/*------3D View-----------------*/

private void show3DView(final View view) {
JComponent jc = (JComponent)view;

Container parent = jc.getParent(); // dummyComponent.getParent();
if (parent instanceof JSplitPane) {
JSplitPane splitPane = (JSplitPane)parent;

int loc = splitPane.getDividerLocation();
int min = splitPane.getMinimumDividerLocation();
int max = splitPane.getMaximumDividerLocation();


if(is3DViewClicked){
splitPane.setDividerLocation(0.0);
is3DViewClicked = false;
}
else {
splitPane.setDividerLocation(1.0);
is3DViewClicked = true;
}
}

Thnak You
[Mar 10, 2015, 3:32:41 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
prabath
Member
Member's Avatar


Joined: Dec 24, 2014
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need to deploy on Tomcat serer

Hi Puybaret..

In my application , I retrieve the Floor Plan from the server. (Not from the Client side). When I try to save the Floor Plan, It gives
a NotSerializableException. Because I load the Floor Plan image through a URL

eg :
Content c = new URLContent(new URL(AppletApplication.URL_PREFIX + "/restAPI/plan/" + AppletApplication.SELECTED_PLAN_ID +"/image"));


I would be thankful, If you are able to give me a solution for this.

Thank You...........
[Mar 12, 2015, 5:14:29 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 42   Pages: 5   [ Previous Page | 1 2 3 4 5 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved