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
Related
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.
I'm a beginner of JavaFX. Is there anyway to change the color of title bar. I just want to make the application all black. I have searched the JavaFX API, but I can't find any method to make it.
This is pretty much an OS dependent thing. The operating system gets to decide how titlebars and borders are displayed by default. However, it definitely can be done, if you are willing to venture into making your own title bar.
To start out, you will need to modify the application window's stage to StageStyle.UNDECORATED. Then you will need to set up your own borders and title bar (complete with things like the title, minimize button, close button, etc.). You can then add the border pane as a scene into your application's stage, and that should render your custom titlebar then without the default Windows styling.
You can find an example implementation of that here: https://stackoverflow.com/a/9864496/2694511
Do note that because you are implementing your own titlebar, you will also lose the OS's default window drag behavior, so you will need to implement your own window-drag/window-move code. This answer might be able to help you with that: https://stackoverflow.com/a/11781291/2694511
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.
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.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
The scroll lock button seems to be a reminder of the good old green terminal days. Does anyone still use it? Should the 101 button keyboard become the 100 button keyboard?
In Excel, if you turn on scroll lock, using the arrow keys scrolls the spread sheet instead of changing the cell the cursor is in.
I use it all the time on Unix terminals. It is quite handy when something catches my eye when I'm tailing a log file.
In many KVM situations, double-hitting scroll lock with bring up the machine selection screen.
Microsoft Excel uses Scroll Lock to allow you to scroll the spreadsheet around with the arrow keys without changing the active/selected cell -- in line with the Scroll Lock key's original intent.
In Microsoft Excel, Scroll Lock allows you to scroll a spreadsheet with the arrow keys without moving the active cell pointer from the currently highlighted cell. In Quattro Pro, another spreadsheet program, Scroll Lock works in a similar manner, although in contrast to Excel it's not possible to scroll the active cell pointer completely off the screen.
Other programs use Scroll Lock for special functions.
Scroll lock (at least the LED for it, anyways) is used along with the caps lock and num lock LED's to provide diagnostic error codes when troubleshooting hardware issues on Dell laptops. This is quite useful when troubleshooting display problems that might prevent diagnostic messages from being read off the screen.
It looks mostly dead:
http://en.wikipedia.org/wiki/Scroll_lock
I don't remember the last time I used it...
If you happen to have some legacy MS-DOS games around, it might be useful ;-)
One of the visualization plugins for Winamp (A media player) uses scroll lock to prevent the visualization from rotating visualizations every x seconds
In Synergy you can lock your mouse to the current screen. Very helpful when you want to share a mouse with a PC on the other side of the room.
Well, that's yet another key to be used with AutoHotkey... (or other keyboard shortcut managers).
Since it is connected to the LED, some clever folks have added code to make it flash (e.g. scroll lock on/off/on/off) at a given interval as a notification for new email messages (or similar)
This can be "cool" if you have a laptop, that is closed (or the screen is sleeping)... you just see if the light is blinking.
I use it all the time, with the purpose for which it was made. For a variety of things.