Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues regarding icalendarAgenda inside Window #8

Open
eagleCoders opened this issue Apr 29, 2017 · 19 comments
Open

Issues regarding icalendarAgenda inside Window #8

eagleCoders opened this issue Apr 29, 2017 · 19 comments

Comments

@eagleCoders
Copy link

I am posting my code and the screen shots to explain my problem
public class DashboardContainer extends StackPane{
private StackPane mainPane;
private BorderPane borderPane;
private GridPane gridPane;
private TilePane taskPane, metroUiPane;
private ObservableList dashboardNodes;
private StackPane centerPane;
private Stage primaryStage;

public DashboardContainer(Stage primaryStage) {}

/**
*
*/
private void init(){
mainPane = new StackPane();

	TilePane titlePane = new TilePane();
	titlePane.setCenterShape(true);
	titlePane.setAlignment(Pos.CENTER);
	titlePane.getStyleClass().add("title");
	Text welcomeText = new Text("Welcome to Healthcare System");
	welcomeText.setId("welcome-text");
	titlePane.getChildren().add(welcomeText);
	borderPane.setTop(titlePane);
	
    gridPane = new GridPane();
    mainPane.getChildren().add(gridPane);
	gridPane.getStyleClass().add("dashboard-grid");
	ColumnConstraints columnLeft = new ColumnConstraints();
	columnLeft.setPercentWidth(5.0);
	ColumnConstraints columnCenter = new ColumnConstraints();
	columnCenter.setPercentWidth(75.0);
	ColumnConstraints columnRight = new ColumnConstraints();
	columnRight.setPercentWidth(20.0);
	gridPane.getColumnConstraints().addAll(columnLeft, columnCenter, columnRight);
	
	RowConstraints topRow = new RowConstraints();
	topRow.setPercentHeight(5);
	RowConstraints centerRow = new RowConstraints();
	centerRow.setPercentHeight(90);
	RowConstraints bottomRow = new RowConstraints();
	bottomRow.setPercentHeight(5);
	gridPane.getRowConstraints().addAll(topRow, centerRow, bottomRow);

	
	initDashboardPane();
	initTaskPane();
	
	borderPane.setCenter(mainPane);
}

/**
 * 
 */
private void initTaskPane(){
    taskPane = new TilePane();
	taskPane.setOrientation(Orientation.VERTICAL);
	taskPane.getStyleClass().add("dashboard-contents");
	GridPane.setConstraints(taskPane, 2, 0);
	GridPane.setRowSpan(taskPane, GridPane.REMAINING);
	gridPane.getChildren().add(taskPane);
	
}

/**
 * 
 */
private void initDashboardPane(){
	centerPane = new StackPane();
	Group mainGroup = new Group();
	centerPane.getChildren().add(mainGroup);

	GridPane.setConstraints(centerPane, 1, 1);
	gridPane.getChildren().add(centerPane);
	centerPane.setAlignment(Pos.CENTER);
	metroUiPane = new TilePane(Orientation.HORIZONTAL);
	metroUiPane.setHgap(2.0);
	metroUiPane.setVgap(2.0);
	metroUiPane.getStyleClass().add("dashboard-contents");
	dashboardNodes = metroUiPane.getChildren();
	centerPane.getChildren().add(metroUiPane);
}

private void generateTiles(){
	Button patientSatisfactionDashboard = new Button("PatientSatisfactionDashboard");
	patientSatisfactionDashboard.setOnAction(e->{
		Window window = new Window("PatientSatisfactionDashboard");
		ICalendarAgenda agenda = new ICalendarAgenda(new VCalendar());
		
		window.getContentPane().getChildren().add(agenda);
        window.getLeftIcons().add(new CloseIcon(window));
        window.getRightIcons().add(new MinimizeIcon(window));
        window.setPrefSize(getPrefWidth(), getPrefHeight());
        getChildren().add(window);
	});
	Button patientMonitoringDashboard = new Button("PatientMonitoringDashboard");
	Button bedManagementDashboard = new Button("BedManagementDashboard");
	Button erStatusDashbaord = new Button("ERStatusDashboard");
	Button queueManagementDashboard = new Button("QueueManagementDashboard");
	metroUiPane.getChildren();
	metroUiPane.getChildren().addAll(patientMonitoringDashboard, patientSatisfactionDashboard, erStatusDashbaord, bedManagementDashboard,queueManagementDashboard);
}

}

screen shot 2017-04-29 at 3 51 14 pm

screen shot 2017-04-29 at 3 51 04 pm

It seems the agenda creation popup is apearing in seprate stage. please do help

@daviddbal
Copy link
Member

I wrote that control. I'll take a look to see what I can do to replicate and then fix the problem.

@daviddbal
Copy link
Member

The popups are separate stages. Is that a problem? Instead, is the problem that the popup is located improperly on the screen?

@eagleCoders
Copy link
Author

eagleCoders commented May 3, 2017 via email

@daviddbal
Copy link
Member

I did look at your screen shots. I'm unclear what they represent. I see the control at the bottom with agenda and the black box above with the edit popup. Why is there a black box? Is that two screen shots? Are you using two monitors?

I know there is a problem with locating the popup property with multiple monitors. If that is the source of the problem, then I have a good idea how to fix the problem. I just haven't gotten around to fixing it yet. Your need will be the motivation to fix it.

@eagleCoders
Copy link
Author

eagleCoders commented May 4, 2017 via email

@daviddbal
Copy link
Member

Try it now. Is the location of the popup acceptable?

@eagleCoders
Copy link
Author

eagleCoders commented May 11, 2017 via email

@tbee
Copy link
Member

tbee commented May 11, 2017

We have nightly snapshot builds in sonatype, so you need to use that repository.
https://oss.sonatype.org/content/repositories/snapshots/org/jfxtras/

@eagleCoders
Copy link
Author

eagleCoders commented May 11, 2017 via email

@eagleCoders
Copy link
Author

eagleCoders commented May 11, 2017 via email

@daviddbal
Copy link
Member

Why do you want to pass the owner stage?

I have several trials that show working demos of icalendaragenda at the link below:
https://github.com/JFXtras/jfxtras/tree/8.0/jfxtras-icalendaragenda/src/test/java/jfxtras/scene/control/agenda/icalendar/trial

If you want to get a handle on the new appointment dialog then I suggest you look for it by its ID - which is "newAppointmentDialog" All of its buttons have IDs too such as newAppointmentCreateButton, newAppointmentEditButton and newAppointmentCancelButton

I am not sure I understand your problem.

@eagleCoders
Copy link
Author

eagleCoders commented May 11, 2017 via email

@daviddbal
Copy link
Member

daviddbal commented May 11, 2017 via email

@eagleCoders
Copy link
Author

eagleCoders commented May 11, 2017 via email

@daviddbal
Copy link
Member

I understand what you are saying, but I think I need to examine the problem with some working code to diagnosis why it is occurring.

@eagleCoders
Copy link
Author

eagleCoders commented May 11, 2017 via email

@daviddbal
Copy link
Member

I'm going to have to extract parts of that code into a simple demo. I'll try to find time later today.

Does the same black background problem occur if the add a simple control instead of agenda - such as a VBox with a button that opens an alert dialog? The problem may be independent of agenda but a consequence in your implementation.

@daviddbal
Copy link
Member

Try not using the Window - just add the agenda to the children list directly. The Window constructor isn't suppose to be visible anyway. I don't know how you are using it. The below code works without any black background.

`package jfxtras.scene.control.agenda.icalendar.trial;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import jfxtras.icalendarfx.VCalendar;
import jfxtras.scene.control.agenda.icalendar.ICalendarAgenda;

public class TestProblem extends Application
{
public static void main(String[] args) {
launch(args);
}

    @Override
    public void start(Stage primaryStage) {
        
    	TestContainer root = new TestContainer(primaryStage);

        Scene scene = new Scene(root, 1366, 768);
        primaryStage.setScene(scene);
        primaryStage.show();        
    }
    
    class TestContainer extends StackPane
    {
    	public TestContainer(Stage primaryStage)
    	{
    		Button myButton = new Button("press");
    		getChildren().add(myButton);
    		myButton.setOnAction(e ->
    		{
		        VCalendar vCalendar = new VCalendar();
		        ICalendarAgenda agenda = new ICalendarAgenda(vCalendar); // Agenda - displays the VCalendar information
		    	getChildren().add(agenda);	    			
    		});
    	}
    }

}`

@eagleCoders
Copy link
Author

eagleCoders commented May 11, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants