Giter Club home page Giter Club logo

Comments (7)

lognaturel avatar lognaturel commented on June 12, 2024 1

I say go for the refactor! 😊 It seems like a fairly focused change to make that will provide benefits in the future.

Edit: and yes, keeping focus on the last used component sounds right.

from briefcase.

carstendev avatar carstendev commented on June 12, 2024 1

Okay, I´ll work on it sometime this week.

from briefcase.

yanokwa avatar yanokwa commented on June 12, 2024

This behavior also happens after an export.

from briefcase.

carstendev avatar carstendev commented on June 12, 2024

This problem seems to be caused by the FocusTraversalPolicy on the MainBriefcaseWindow. In both getComponentBefore and getComponentAfter (line 284 - 357)

tabbedPane.setSelectedIndex(nextPanel);

is called, to switch to the next tab, if no component is found, satisfying the following conditions.

if ( comp == tabbedPane ) {
    return comp;
}

if ( comp.isVisible() && comp.isEnabled() && (!(comp instanceof JTextField) || 
((JTextField) comp).isEditable()) ) {
    return comp;
}

If the cancel button, wich is the component after the pull button is disabled, the conditions will evaluate to false, causing the tab jump.

Instead of jumping to the next tab if no component is found, keeping the focus on the last used component could be a good solution.
In terms of class design, refactoring the tabs to implement their own policies might even be better.
@yanokwa @lognaturel What do you guys think?

from briefcase.

lognaturel avatar lognaturel commented on June 12, 2024

@carstendev I'll leave this issue closed since the surface problem is fixed. We'd love some refactoring if you're still up for it! 😊

from briefcase.

carstendev avatar carstendev commented on June 12, 2024

@lognaturel Refactoring is still a good idea, I´ll try to work on it, as soon as I´m not so swamped with work.

from briefcase.

lognaturel avatar lognaturel commented on June 12, 2024

Of course, whenever you have time. Thanks, @carstendev!

from briefcase.

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.