JavaFX, best node/tools to use for this task? [closed] - javafx

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 13 days ago.
Improve this question
i'm developing as a University project a destkop program that handles restaurant menu's management.
Since i'm new to JavaFX, i don't have knowledge of the various tools i can use. I'll provide a mock up of what i want to create with explanations.
The big rounded rectangles are my 'Categories', so 'Appetizers' and 'First Course' (in my mock up they're in italian, so i'm translating). I want this rectangles to be clickable so they can expand and show the meals they have inside.
By pressing the + button, i want to create a category.
Since my program have to be about organizing the menu, i also want to click the - button and enter a "delete" mode, where checkboxes appear on the left side of both categories and meals, i can select them and pressing 'Confirm' deletes them.
I also want to press the '=' button to order my categories (maybe i want to put Appetizers after First Course, or move meals inside a category).
What do you think is the best tools/library/node i can use to deal with this problem? I've looked up a lot but only found out about TitledPanes or Accordions, but seems to static for what i have to do.

there could be MANY more viable options to deal with this problem.
Understandable, but there are not.
You can be confident that you have the best advised solution to your problem by selecting TitledPanes or an Accordion.
To learn to use these controls, you can prototype using SceneBuilder. You can study layouts in the Oracle tutorials.
Accordions, but seems to static for what i have to do.
See Accordion getPanes() javadoc:
Changing this ObservableList will immediately result in the Accordion updating to display the new contents of this ObservableList.
so the content is dynamic, not static.
can i move the titledpanes' position inside the accordion at runtime?
The order in the pane list determines the order of the displayed panes in the Accordion. Changing the order in the list will automatically change the displayed order, as it is an observed list.

Related

should i use Window Popups or in-app overlays? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm developing a somewhat complex app with javaFx and I'm facing a technical decision concerning popups (tooltips, context menus, alerts... etc), it seems like I have two approaches to go about it:
extend PopupWindow (or PopupControl), the popups will be rendering outside the application in their own undecorated window.
wrap my whole app in a parent that supports fixed/absolute positioning and show/position popups as overplayed nodes.
I know this seems a bit opinion based but i just can't find any resources on it, if anyone done some profiling or a performance comparison, and I don't know which one is "best-practice" for a desktop application.
It intuitively seems like the window popup approach is favoured and easier to implement but I've seen real applications like messenger and discord using the second approach (maybe because they're using electron and they're obliged to follow "the web way" of doing things).
any help would be appreciated.
UPDATE
I'm back to add my input on this question after trying to implement the ideas, just in case anyone comes by this question with the same issues.
both approaches come with limitations and I came across the following issues :
Tooltips blocking mouse events
If you build your tooltip system around PopupControl (or PopupWindow) and you want your tooltips to have a shadow around them, the tooltip (or the shadow) will block the mouse events from reaching the nodes in the application window, and because you can't make the window transparent to mouse events, it would cause some flickering (you hover a node, tooltip shows then steals mouse events which causes a MouseExited event on the node, which causes the tooltip to hide, and it happens endlessly unless you move the mouse away)
This issue is essentially caused by the shadow, building your tooltips around a layout (VBox, for instance) and adding to tooltip to the root of the scene will solve this issue, because you can simply make the tooltip mouse transparent.
Popups having to show outside the application window
in some situations you may have a popup/context menu that has a somewhat fixed position, say it has to show under a specific node and it can't be re-positioned inside the application window, if you build your context menus around a layout that gets added to the scene root, your context menus might have to clip at some places.
This issue is naturally solved if your popups are based on PopupControl or PopupWindow.
Though window popup approach sounds good and easy I have encountered the below two issues with that approach. Just letting you know if you need to consider them.
JavaFX : How to close a sub window without getting focus on main window
JavaFX : How to manage the z-index of stages

How to apply any style to FullCalendar cells

great people from Stack!
I'm having some issues working with Full Calendar I would like to get some help with.
First of all, Full Calendar is an amazing tool. Everything I have had any doubt with has been solved in a breeze just by taking a look at the docs or googling five minutes. However, there is a problem I'm dealing with and can't find (I'm starting to suspect it is virtually impossible, or at least it is for me to imagine how to do it) the way to get it solved.
I'm implementing this library in a project which is meant to be something like an appointments manager, among other things. A (simple) functionality I wanted to add is to open a modal when a calendar cell (agenda week would be the main view) is clicked with a form, allowing to create an appointment for the selected cell. To improve usability, I thought it would be nice if the cells had some kind of hover effect, so that you can feel there is 'something' behind clicking this element. The thing is, the calendar is composed by something like 2 separated overlapping tables, one with rows and the other with columns, that form the grid. The modal system is done and working, dayClick made the trick. Any way to do anything similar to what I am talking about, the hover stuff? (my idea was to make some kind of (+) button appear when hovering, but anything would work.
Thank you!
Seth
Edit: I noticed there is a 'selectable' directive which, given only to the AgendaWeek view, allows me to select cells. The selection is made by the JS code, adding an element just above the cell, with its dimensions. Wouldn't it be any way to call this from hovering a cell instead of just clicking it? I wonder that highlight cell is rendered from the position of the mouse at the time of the click and wouldn't be very efficient to check that all the time...

No play button in embedded Spotify playlist [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to embed music from Spotify on a Wordpress site. Tried both playlist and single tracks - experiences issues with both:
Playlist:
The playlist looks nice, but I'm unable to control what track to play. The only option is to start playing from the top. On pictures there's always a small play button to the left of each track, but it doesn't appear in my case. I'm using the link provided in the Spotify desktop application, which renders into a nice looking playlist in Wordpress, for instance this:
https://open.spotify.com/user/musikkpedagogikk/playlist/1zhS1MDiYYvCYil7PcNJE8
Single tracks
So, then I tried to place single tracks underneath each other. It is now possible to select what track to play, but each player leaves a huge blank space below, which makes it impossible to make a functional page with 5-6 tracks.
Screenshot of playlist without proper play buttons + can only select the top track
showing huge space between single track play buttons
Screenshot of playlist without proper play buttons + can only select the top track - and another showing huge space between single track play buttons
This has been fixed and you should be able to play after clicking on the track in the list.

How does using CSS 3D Transforms affect SEO? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Google's made a big deal of "if you hide it, it won't count." However, google cache shows it doesn't understand a lot of things correctly. Maybe google sees something as hidden when it should show or shows when it should be hidden.
So, I ask about CSS 3D transforms.
Take this example for example:
3d Carousel CSS
Ignoring Javascript, if it were instead coded to to run on pure CSS and rotate on it's own (kind of a replacement for a bannder display)... what would be the SEO effect? Would it treat items that start facing away from the user as hidden and what's facing the user as SEO-able content? Would it ignore 3D and treat them as just divs to look at? Or would it ignore 3d as if it were ALL hidden?
Seems important to know for design purposes if one intends to use 3d effects.
To check what Google's robots see, you should not rely on cache, but on the 'Fetch as Google' feature from Google Webmaster Tools. Cache lags behind the index (sometimes a lot).
Your 'if you hide it, it won't count' rule is not correct. It's: 'if it is never displayed to users, it won't count'. In other words, if users need to click on a button or on a tab menu to display content, it will count for relevancy and ranking (i.e. SEO), but Google will discount such content somehow. Ditto for CSS effects hiding or displaying content.
Google can execute Javascript and take CSS effects into account in general, but always check with the 'Fetch as Google' feature to be sure.

How to design an accordion menu, for mobile, where the expander elements are also links

I have a Mobile design to fulfil:
The menu is a fairly standard Accordion setup.
It starts collapsed.
Tapping anywhere on A will expand it to show the A sub-menu.
Tapping anywhere on B will collapse A and expand B.
Tapping anywhere on A Sub 1 will take you to that link.
All standard so far! But the additional Feature is that A is itself a page that the user might want to access!
We have to fulfil this very specific design, so we can't add expander controls, to separate the link from the expand.
I was originally using simple nested <ul> lists and some trivial JS to bind into the onclick events. That was fine for elements that were links OR expanders but that fell apart on bits that were both.
I tried changing the behaviour to exposes the submenu on hover, to utilise the behaviour that I discovered, and documented here: Tablets hover on first click, click on second click
That does technically work, but not very well: you can't scroll the menu properly because touching outside your current expansion will change the selection; the hover exposure of the submenu isn't animated; it generally doesn't actually work well for phones and on a small desktop screen it's completely unusable.
I've looked for ages online for an example or a library that will Just Do This, but nothing fits what I need, and we've been given this very specific design spec.
Currently my only solution is going to be to implement the 2 phase clicking myself in javascript, storing the current state of the element in data attributes and reading those before deciding what action to take on click.
Is there any better way to achieve this?
=-=-=-=-=-=-=-=-=-=-=-=
See here for SO posts about related scenarios for a traditional navbar menu:
Tablets hover on first click, click on second click
https://stackoverflow.com/questions/29354150/deactivate-hover-on-tablet
You just need sit at your computer and watch for responses in about 50 years when all programs will include multiple touch, voice recognition, and thought features to accommodate your functionality request.
Personal experience dictates this problem will not be solved in less then 5 to ten years based on Moore's Law and general apathy on the internet.

Resources