mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 06:50:56 +03:00
reviewed (and tested) all key bindings on Windows
This commit is contained in:
@@ -48,10 +48,10 @@ class FlatInputMaps
|
||||
modifyInputMap( defaults, "ComboBox.ancestorInputMap",
|
||||
"SPACE", "spacePopup",
|
||||
|
||||
"UP", "selectPrevious",
|
||||
"DOWN", "selectNext",
|
||||
"KP_UP", "selectPrevious",
|
||||
"KP_DOWN", "selectNext",
|
||||
"UP", "selectPrevious2",
|
||||
"DOWN", "selectNext2",
|
||||
"KP_UP", "selectPrevious2",
|
||||
"KP_DOWN", "selectNext2",
|
||||
|
||||
mac( "alt UP", null ), "togglePopup",
|
||||
mac( "alt DOWN", null ), "togglePopup",
|
||||
@@ -64,11 +64,16 @@ class FlatInputMaps
|
||||
"F2", "editFileName",
|
||||
"BACK_SPACE", "Go Up"
|
||||
);
|
||||
}
|
||||
|
||||
modifyInputMap( defaults, "Slider.focusInputMap",
|
||||
"ctrl PAGE_DOWN", "negativeBlockIncrement",
|
||||
"ctrl PAGE_UP", "positiveBlockIncrement"
|
||||
);
|
||||
// join ltr and rtl bindings to fix up/down/etc keys in right-to-left component orientation
|
||||
Object[] bindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings" );
|
||||
Object[] rtlBindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings.RightToLeft" );
|
||||
if( bindings != null && rtlBindings != null ) {
|
||||
Object[] newBindings = new Object[bindings.length + rtlBindings.length];
|
||||
System.arraycopy( bindings, 0, newBindings, 0, bindings.length );
|
||||
System.arraycopy( rtlBindings, 0, newBindings, bindings.length, rtlBindings.length );
|
||||
defaults.put( "PopupMenu.selectedWindowInputMapBindings.RightToLeft", newBindings );
|
||||
}
|
||||
|
||||
modifyInputMap( defaults, "TabbedPane.ancestorInputMap",
|
||||
@@ -76,6 +81,14 @@ class FlatInputMaps
|
||||
"shift ctrl TAB", "navigatePrevious"
|
||||
);
|
||||
|
||||
modifyInputMap( defaults, "Table.ancestorInputMap",
|
||||
// swap to make it consistent with List and Tree
|
||||
"HOME", "selectFirstRow",
|
||||
"END", "selectLastRow",
|
||||
mac( "ctrl HOME", null ), "selectFirstColumn",
|
||||
mac( "ctrl END", null ), "selectLastColumn"
|
||||
);
|
||||
|
||||
if( !SystemInfo.IS_MAC ) {
|
||||
modifyInputMap( defaults, "Tree.focusInputMap",
|
||||
"ADD", "expand",
|
||||
|
||||
@@ -165,6 +165,7 @@ public class FlatComponentsTest
|
||||
JLabel scrollPaneLabel = new JLabel();
|
||||
JScrollPane scrollPane13 = new JScrollPane();
|
||||
JPanel panel1 = new JPanel();
|
||||
JButton button19 = new JButton();
|
||||
JScrollBar scrollBar2 = new JScrollBar();
|
||||
JScrollBar scrollBar3 = new JScrollBar();
|
||||
JScrollBar scrollBar7 = new JScrollBar();
|
||||
@@ -803,8 +804,14 @@ public class FlatComponentsTest
|
||||
|
||||
//======== panel1 ========
|
||||
{
|
||||
panel1.setPreferredSize(new Dimension(200, 200));
|
||||
panel1.setPreferredSize(new Dimension(800, 400));
|
||||
panel1.setLayout(new BorderLayout());
|
||||
|
||||
//---- button19 ----
|
||||
button19.setText("I'm a large button");
|
||||
button19.setVerticalAlignment(SwingConstants.TOP);
|
||||
button19.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
panel1.add(button19, BorderLayout.CENTER);
|
||||
}
|
||||
scrollPane13.setViewportView(panel1);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.1" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -728,7 +728,15 @@ new FormModel {
|
||||
"verticalScrollBarPolicy": 22
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
|
||||
name: "panel1"
|
||||
"preferredSize": new java.awt.Dimension( 200, 200 )
|
||||
"preferredSize": new java.awt.Dimension( 800, 400 )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button19"
|
||||
"text": "I'm a large button"
|
||||
"verticalAlignment": 1
|
||||
"horizontalAlignment": 2
|
||||
}, new FormLayoutConstraints( class java.lang.String ) {
|
||||
"value": "Center"
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 13,grow,width 70,height 70"
|
||||
|
||||
@@ -26,17 +26,17 @@ ComboBox.ancestorInputMap [lazy] 15 javax.swing.plaf.InputMapUIResource
|
||||
alt KP_DOWN togglePopup
|
||||
alt KP_UP togglePopup
|
||||
alt UP togglePopup
|
||||
DOWN selectNext
|
||||
DOWN selectNext2
|
||||
END endPassThrough
|
||||
ENTER enterPressed
|
||||
ESCAPE hidePopup
|
||||
HOME homePassThrough
|
||||
KP_DOWN selectNext
|
||||
KP_UP selectPrevious
|
||||
KP_DOWN selectNext2
|
||||
KP_UP selectPrevious2
|
||||
PAGE_DOWN pageDownPassThrough
|
||||
PAGE_UP pageUpPassThrough
|
||||
SPACE spacePopup
|
||||
UP selectPrevious
|
||||
UP selectPrevious2
|
||||
|
||||
|
||||
#---- Desktop ----
|
||||
@@ -327,15 +327,39 @@ PasswordField.focusInputMap [lazy] 37 javax.swing.plaf.InputMapUIResource
|
||||
|
||||
#---- PopupMenu ----
|
||||
|
||||
PopupMenu.selectedWindowInputMapBindings.RightToLeft length=8 [Ljava.lang.Object;
|
||||
[0] LEFT
|
||||
[1] selectChild
|
||||
[2] KP_LEFT
|
||||
[3] selectChild
|
||||
[4] RIGHT
|
||||
[5] selectParent
|
||||
[6] KP_RIGHT
|
||||
[7] selectParent
|
||||
PopupMenu.selectedWindowInputMapBindings.RightToLeft length=32 [Ljava.lang.Object;
|
||||
[0] ESCAPE
|
||||
[1] cancel
|
||||
[2] DOWN
|
||||
[3] selectNext
|
||||
[4] KP_DOWN
|
||||
[5] selectNext
|
||||
[6] UP
|
||||
[7] selectPrevious
|
||||
[8] KP_UP
|
||||
[9] selectPrevious
|
||||
[10] LEFT
|
||||
[11] selectParent
|
||||
[12] KP_LEFT
|
||||
[13] selectParent
|
||||
[14] RIGHT
|
||||
[15] selectChild
|
||||
[16] KP_RIGHT
|
||||
[17] selectChild
|
||||
[18] ENTER
|
||||
[19] return
|
||||
[20] ctrl ENTER
|
||||
[21] return
|
||||
[22] SPACE
|
||||
[23] return
|
||||
[24] LEFT
|
||||
[25] selectChild
|
||||
[26] KP_LEFT
|
||||
[27] selectChild
|
||||
[28] RIGHT
|
||||
[29] selectParent
|
||||
[30] KP_RIGHT
|
||||
[31] selectParent
|
||||
PopupMenu.selectedWindowInputMapBindings length=24 [Ljava.lang.Object;
|
||||
[0] ESCAPE
|
||||
[1] cancel
|
||||
@@ -428,9 +452,7 @@ Slider.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource
|
||||
KP_RIGHT negativeUnitIncrement
|
||||
LEFT positiveUnitIncrement
|
||||
RIGHT negativeUnitIncrement
|
||||
Slider.focusInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
|
||||
ctrl PAGE_DOWN negativeBlockIncrement
|
||||
ctrl PAGE_UP positiveBlockIncrement
|
||||
Slider.focusInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
|
||||
DOWN negativeUnitIncrement
|
||||
END maxScroll
|
||||
HOME minScroll
|
||||
@@ -523,8 +545,8 @@ Table.ancestorInputMap [lazy] 71 javax.swing.plaf.InputMapUIResource
|
||||
ctrl BACK_SLASH clearSelection
|
||||
ctrl C copy
|
||||
ctrl DOWN selectNextRowChangeLead
|
||||
ctrl END selectLastRow
|
||||
ctrl HOME selectFirstRow
|
||||
ctrl END selectLastColumn
|
||||
ctrl HOME selectFirstColumn
|
||||
ctrl INSERT copy
|
||||
ctrl KP_DOWN selectNextRowChangeLead
|
||||
ctrl KP_LEFT selectPreviousColumnChangeLead
|
||||
@@ -542,12 +564,12 @@ Table.ancestorInputMap [lazy] 71 javax.swing.plaf.InputMapUIResource
|
||||
COPY copy
|
||||
CUT cut
|
||||
DOWN selectNextRow
|
||||
END selectLastColumn
|
||||
END selectLastRow
|
||||
ENTER selectNextRowCell
|
||||
ESCAPE cancel
|
||||
F2 startEditing
|
||||
F8 focusHeader
|
||||
HOME selectFirstColumn
|
||||
HOME selectFirstRow
|
||||
KP_DOWN selectNextRow
|
||||
KP_LEFT selectPreviousColumn
|
||||
KP_RIGHT selectNextColumn
|
||||
|
||||
Reference in New Issue
Block a user