Code Monkey home page Code Monkey logo

Comments (10)

RandallSell avatar RandallSell commented on August 16, 2024

Hi Cheok,

I haven't tried to reproduce this but I don't think I really need to. It is set to stay on top in the Z-order. this was done to mirror the prior behaviour. I've never liked how that worked and would prefer it acted like a normal window so will take it's place in the z-order correctly.

I'm happy to strip that out. Just realize what the implications are...

Currently if the user minimizes JStock all windows go away, charts included. And when restored the charts are back on top again. But if we remove that, charts will move under the main app.

I'm happy to make the change if you like.

regards,
-randall

from jstock.

yccheok avatar yccheok commented on August 16, 2024

May I know how are u going to solve it? Is this bug happens, after we had changed history chart from JDialog to JFrame?

from jstock.

RandallSell avatar RandallSell commented on August 16, 2024

With the JFrame I'd stuck in a bit of a hack so it acted more like a JDialog, namely stay on top of your calling form. In fact if you search for "hack" I'm sure it would bring you right to it. It involved an initial JFrame setting (property) and then adjusting that properly in the JFrame events.

So I'd just remove all that code so it can move around in the Z-order. That means if the user should click back on the main JStock app/form the chart would move under it. For the way I operate, I'd be happy with that.

As for the immediate issue, the user can press ALT-SPACE to select the system menu, then either move or close it. But most Windows users probably wouldn't know about this keyboard shortcut.

shall I make the change?

-randall

from jstock.

yccheok avatar yccheok commented on August 16, 2024

I'm still not 100% clear on your proposed solution, can you just make the
necessary changes, and send me a pull request?

Code speaks better :)

Thanks!
Cheok
On 9 Jul 2015 8:03 am, "RandallSell" [email protected] wrote:

With the JFrame I'd stuck in a bit of a hack so it acted more like a
JDialog, namely stay on top of your calling form. In fact if you search for
"hack" I'm sure it would bring you right to it. It involved an initial
JFrame setting (property) and then adjusting that properly in the JFrame
events.

So I'd just remove all that code so it can move around in the Z-order.
That means if the user should click back on the main JStock app/form the
chart would move under it. For the way I operate, I'd be happy with that.

As for the immediate issue, the user can press ALT-SPACE to select the
system menu, then either move or close it. But most Windows users probably
wouldn't know about this keyboard shortcut.

shall I make the change?

-randall


Reply to this email directly or view it on GitHub
#42 (comment).

from jstock.

RandallSell avatar RandallSell commented on August 16, 2024

OK, I've looked into this closer now and have concluded that there is no solution - at least when it comes to JFrame....

First, if you want to see what I was talking about, search ChartJDialog for alwaysOntop and toFront and comment that out. Don't forget to remove the design-time alwaysOnTop as well.

So now it is just a stock-standard JFrame. This actually works as I want BUT it fails if JStock's AlwaysOnTop (menu item of main frame) is on. So if the app's AlwaysOntop setting is checked, the charts will always fall behind the main JStock app - not good!

Now I could go out and tinker with the About dialog's alwaysOnTop and that would sort out this issue, but it is all getting too hacked up as I would imagine there would be other dialogs with the same problem. Before you know it EVERYTHING has to have AlwaysOnTop turned on. That would get ugly.

My original objective was to have a simple way to maximize the charts. And a dbl-click on the status bar is the most intuitive way to do that. It is a real shame that JDialog doesn't follow that behaviour! Hence all the stuffing about with JFrame.

So my gut feeling is all this should be rolled back to be a JDialog. Then it will play nice with the About dialog and the main frame's AlwayOnTop setting. And I have a re-think of how to make it easy to maximize the charts. I have a couple of ideas on that:

  1. Create a menu item to manually maximize/restore the chart dialog - not very Window's standard but then again this is Java.

  2. Create a stored property a la AlwaysMaximize so when charts are opened they are automatically made full screen.

Your thoughts?

-randall

from jstock.

yccheok avatar yccheok commented on August 16, 2024
  1. How about not turning on "always in top" for chart window, if main frame
    is always on top? but again, this won't solve the prob, if user is using
    jstock according to steps in the ticket.
    On 10 Jul 2015 10:05 am, "RandallSell" [email protected] wrote:

OK, I've looked into this closer now and have concluded that there is no
solution - at least when it comes to JFrame....

First, if you want to see what I was talking about, search ChartJDialog
for alwaysOntop and toFront and comment that out. Don't forget to remove
the design-time alwaysOnTop as well.

So now it is just a stock-standard JFrame. This actually works as I want
BUT it fails if JStock's AlwaysOnTop (menu item of main frame) is on. So if
the app's AlwaysOntop setting is checked, the charts will always fall
behind the main JStock app - not good!

Now I could go out and tinker with the About dialog's alwaysOnTop and that
would sort out this issue, but it is all getting too hacked up as I would
imagine there would be other dialogs with the same problem. Before you know
it EVERYTHING has to have AlwaysOnTop turned on. That would get ugly.

My original objective was to have a simple way to maximize the charts. And
a dbl-click on the status bar is the most intuitive way to do that. It is a
real shame that JDialog doesn't follow that behaviour! Hence all the
stuffing about with JFrame.

So my gut feeling is all this should be rolled back to be a JDialog. Then
it will play nice with the About dialog and the main frame's AlwayOnTop
setting. And I have a re-think of how to make it easy to maximize the
charts. I have a couple of ideas on that:

  1. Create a menu item to manually maximize/restore the chart dialog - not
    very Window's standard but then again this is Java.

  2. Create a stored property a la AlwaysMaximize so when charts are opened
    they are automatically made full screen.

Your thoughts?

-randall


Reply to this email directly or view it on GitHub
#42 (comment).

from jstock.

RandallSell avatar RandallSell commented on August 16, 2024

The quick-fix would be to turn on AlwaysOnTop for the About Dialog but I reckon it is just a matter of time before someone finds a similar way to break it. let's face it, any JDialog you open while you wait for a large chart to load will cause it. So if you are fast enough on the mouse, you could reproduce this in numerous ways.

Let me know which way you want to go with it and I'll tweak the code this weekend.

-rs

from jstock.

yccheok avatar yccheok commented on August 16, 2024

Sorry. I am outstation right now. Will respond to you once I back.
On 10 Jul 2015 4:05 pm, "RandallSell" [email protected] wrote:

The quick-fix would be to turn on AlwaysOnTop for the About Dialog but I
reckon it is just a matter of time before someone finds a similar way to
break it. let's face it, any JDialog you open while you wait for a large
chart to load will cause it. So if you are fast enough on the mouse, you
could reproduce this in numerous ways.

Let me know which way you want to go with it and I'll tweak the code this
weekend.

-rs


Reply to this email directly or view it on GitHub
#42 (comment).

from jstock.

yccheok avatar yccheok commented on August 16, 2024

I get the following report from a user. I'm still keep in touch with him, to find out how to reproduce the problem.

Dear Sir,

first of all congratulations to your entire team for nice one free software.

I as  using  since last 6 months. in past i was use in window xp os. where
i easily open chart & see price history easily.
Now i have all in one computor LENOVO & using window 8.
now in day chart window open but immediate minimize. if i click there
but immediate it minimize. so it make difficulties to see past history or sma etc.

I will  be thank full if you give some help on this. Is window 8 is totally ok to use JSTOCK ??

wait for early reply.

once again thanks to all your team.

from jstock.

RandallSell avatar RandallSell commented on August 16, 2024

I've not seen the windows minimize before. Perhaps he is running some sort of keyboard macro? My suspicions would be on their system configuration. Do any other apps on his system misbehave like this? Very weird.

Then again, I don't run Win8 so who knows, maybe something particular to it?

-rs

from jstock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.