We are building a program for visual impaired people, the aim is to replace some features of the screen, like colors, shapes or else. Currently, we have a full-screen window, we grab a snapshot of the screen (through the robot java library) and we reproduce it to the full-screen window. When we try to take the next screenshot, obviously the image we got refers to the current full-screen window. We need to get the back of the full-screen window, after an extensive research we had no success on find a way to do so.
Do you know of a library or a way to achieve this, possibly (but not necessarily) in java?
If you are in Windows 7 you could
1) have Robot click the Rectangle in the lower right corner (to the right of the clock). This will minimize everything.
2) Then have Robot take the screenshot
3) have Robot click the Rectangle again, returning all app windows to previous state
4) have Robot take the other screenshot showing with apps open (if you like)
Robot can do this very fast, but it will interfere with any mouse movement that the user is doing.
You can achieve something similar in other versions of Windows by using right click on the task bar and then selecting "Show the Desktop" and "Show open Windows" to return to the original perspective.
Related
What I want to achieve is this:
On Windows platform:
Right click on a window (some context menu will show up)
Capture the screenshot into a bitmap.
Create a window containing the screenshot on top of everything in the screen, including the context window.
Is step 3 possible?
ADD 1
I am going through the Window Styles from the 2 links below:
Extended Windows Styles
Windows Styles
Not sure if they can help me.
I discovered a solution in C# that may be applicable. If you bring the window to the front after the context menu has been created, it will bring it in front of the context menu. You can emulate a window that is always on top of everything on the screen by repeatedly bringing it to the front in a background thread.
Here is the C# implementation:
How to draw on top of the right-click menu in .NET/C#?
This link may also help. I don't know if the same process could be used to display on top of the right-click menu, especially not in Java, but it may be worth a look:
How can I make my own application on top in the start menu?
I am making a javafx application and I made the border around it invisible but now I would like to know how to "fake" someone from clicking on the fullscreen button (in Windows the middle button in the right top corner). I know how to make it 100% fullscreen but I just want to know how to "fake" the clicking of the windows fullscreen button.
Thanks.
Solution
I think you refer to a maximize button, and perhaps the stage.setMaximized() method.
Maximized != Full Screen
Setting the stage fullscreen viastage.setFullScreen() is generally a different thing than maximizing a stage. A full screen stage operates in full screen exclusive mode (i.e. no windowing at all, the stage takes over the entire display).
Related
What you seem to be doing is creating an undecorated window (i.e. a window with no default OS window frame and no in-built controls for resizing, title and minimize/maximize/close), but you still want some of the functionality that you would get if the window were decorated (by adding your own custom decoration controls to provide it). For more information on how to tackle that problem, see the related question:
JavaFX entirely customized windows?
In particular, checkout the Undecorator project, which is the defacto standard way of supplying such functionality for JavaFX.
In IntelliJ every time I make a change in code and I run the app afterwards, "run window" is automatically popped up. Is there any way to disable this annoying behaviour or how to make it less distracting?
I finally could solve this one. At least it worked for me. At the bottom of "Run/Debug configurations" window and in "Before launch" part, uncheck "Activate tool window" check box.
There is currently no solution to do this permanently. However, there is a workaround to prevent it from popping up. Try this:
After the first time the window pops-up simply resize it all the way to the bottom (i.e. grab the TOP and drag down until the window disappears). This will prevent it from popping up again until you manually click one of the buttons to open any window in the same area (i.e. Run, TODO, Android, Terminal, Messages, (and Find Results) - or whatever you have in that same area if you've customized it).
To keep it from popping up, never click the hide button on any of these windows but rather use the same "drag from top to bottom" to hide them (the effect is the same).
This is annoying, to say the least, but once you get used to it it works fine and is much less annoying than dealing with that blasted Run popup window :)
NOTE
I should mention that this is completely safe to do as the windows are only hidden when you do this, and clicking the window's button at the bottom will show it in its original size - so nothing goes missing or breaks using this method :-)
These are called Tool Windows. Right-click the tool window, it pops up a menu, the last option of which is 'Hide'.
Alternatively,
You can install the plugin ToolWindow Manager to show/hide the Tool Window of your choice.
Either
1. Set the run window to be in either split and then shrink it down to be as small as possible.
2. Set the windows to be in floating mode and then shrink it down and move it somewhere less distracting.
disabling checkboxes in "Window | Background tasks solved my problem.
It is soooo annoying oO I just dragged the windows to an other screen and/or set their height to a minimum.. Not "best practise" but it is better than nothing -.-
In intellij go to main menu windows->active tool window->disable floating mode option there.
thanks
For those who are facing this issue with "Run" window they can follow below instruction
From dropdown select "Edit Configuration":
Open Logs tab:
Uncheck these 2 checkboxes:
I have found a solution!!!!
There old plugin for Intellij IDE called "Hide Tool Window Ex".
It hides any tool windows that being opened just after you click in editor again.
(plugin page)
visual example
Are there any current implementations or frameworks for Java Swing that include functionality for a context-switcher menu?
More detail:
In our application, we have several sub-parts of the application, and only one of them is displayed at once. Presently there are several ways to switch between them, including tool bar buttons and via the View menu. We would like to add another means, that is accessible via a keyboard shortcut. This would bring up a context-switch menu, similar in concept to those available in modern OS'es.
If you press Alt+Tab and release the Tab while still holding down Alt, you will get a little window in the middle of the screen, displaying the various applications that are running at the moment. In Ubuntu, you get a screenshot of each application, plus its window manager icon. In Windows you get the window manager icons, and so on.
I think this is possible. You could apply a transformation to a Graphics option that you pass to each JFrame and have it paint a small version of itself on it. Then take those images and place them on a GlassPane on top of your application. The highlighting of the selected window might be tricky, but I think it would work nicely.
I'm playing with a Tray and TrayItem in SWT, and i was wondering if there was a way of getting the location on screen of the icon. I want to be able to position another shell just underneath it as if it were a popup.
Basicaly just having a mare trying to find the dimensions and location of it....
Any ideas?
Cheers
Andy
Why would you need this?
If the trigger for displaying the pop-up is a mouse click, you can use the Event object of the listener to get the co-ordinates.
If not, I don't think its a good idea to do this. Mainly because you never know whether a tray icon will be visible or not (in Windows 7 for example). If you are using Gnome, you can use libNotify, which is a much better choice for pop-ups.