Skip to content

Commit

Permalink
FileChooser: fixed missing labels in file chooser when running on Jav…
Browse files Browse the repository at this point in the history
…a 9 or later (issue #98)
  • Loading branch information
DevCharly committed May 13, 2020
1 parent b3e0b99 commit a9cfe69
Show file tree
Hide file tree
Showing 7 changed files with 165 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ FlatLaf Change Log
`flatlaf-swingx-<version>.jar`.
- CheckBox and RadioButton: Flag `opaque` is no longer ignored when checkbox or
radio button is used as table cell renderer. (issue #77)
- FileChooser: Fixed missing labels in file chooser when running on Java 9 or
later. (issue #98)


## 0.34
Expand Down
4 changes: 2 additions & 2 deletions flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ private void initializeAqua() {
public UIDefaults getDefaults() {
UIDefaults defaults = super.getDefaults();

// add Metal resource bundle, which is required for FlatFileChooserUI
defaults.addResourceBundle( "com.sun.swing.internal.plaf.metal.resources.metal" );
// add resource bundle for localized texts
defaults.addResourceBundle( "com.formdev.flatlaf.resources.Bundle" );

// initialize some defaults (for overriding) that are used in UI delegates,
// but are not set in BasicLookAndFeel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
* @uiDefault FileChooser.folderNameLabelText String
* @uiDefault FileChooser.filesOfTypeLabelMnemonic String
* @uiDefault FileChooser.filesOfTypeLabelText String
*
* @uiDefault FileChooser.upFolderToolTipText String
* @uiDefault FileChooser.upFolderAccessibleName String
* @uiDefault FileChooser.homeFolderToolTipText String
Expand All @@ -97,6 +98,20 @@
* @uiDefault FileChooser.detailsViewButtonToolTipText String
* @uiDefault FileChooser.detailsViewButtonAccessibleName String
*
* <!-- FilePane -->
*
* @uiDefault FileChooser.fileNameHeaderText String
* @uiDefault FileChooser.fileSizeHeaderText String
* @uiDefault FileChooser.fileTypeHeaderText String
* @uiDefault FileChooser.fileDateHeaderText String
* @uiDefault FileChooser.fileAttrHeaderText String
*
* @uiDefault FileChooser.viewMenuLabelText String
* @uiDefault FileChooser.refreshActionLabelText String
* @uiDefault FileChooser.newFolderActionLabelText String
* @uiDefault FileChooser.listViewActionLabelText String
* @uiDefault FileChooser.detailsViewActionLabelText String
*
* @author Karl Tauber
*/
public class FlatFileChooserUI
Expand Down
2 changes: 2 additions & 0 deletions flatlaf-core/src/main/module-info/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
exports com.formdev.flatlaf.ui;
exports com.formdev.flatlaf.util;

opens com.formdev.flatlaf.resources;

uses com.formdev.flatlaf.FlatDefaultsAddon;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#---- FileChooser ----

#fields
FileChooser.lookInLabel.textAndMnemonic=Look &In:
FileChooser.saveInLabelText=Save In:
FileChooser.fileNameLabel.textAndMnemonic=File &Name:
FileChooser.folderNameLabel.textAndMnemonic=Folder &name:
FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:

# toolbar
FileChooser.upFolderToolTipText=Up One Level
FileChooser.upFolderAccessibleName=Up
FileChooser.homeFolderToolTipText=Home
FileChooser.homeFolderAccessibleName=Home
FileChooser.newFolderToolTipText=Create New Folder
FileChooser.newFolderAccessibleName=New Folder
FileChooser.listViewButtonToolTipText=List
FileChooser.listViewButtonAccessibleName=List
FileChooser.detailsViewButtonToolTipText=Details
FileChooser.detailsViewButtonAccessibleName=Details

# details table header
FileChooser.fileNameHeaderText=Name
FileChooser.fileSizeHeaderText=Size
FileChooser.fileTypeHeaderText=Type
FileChooser.fileDateHeaderText=Modified
FileChooser.fileAttrHeaderText=Attributes

# popup menu
FileChooser.viewMenuLabelText=View
FileChooser.refreshActionLabelText=Refresh
FileChooser.newFolderActionLabelText=New Folder
FileChooser.listViewActionLabelText=List
FileChooser.detailsViewActionLabelText=Details
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#---- FileChooser ----

#fields
FileChooser.lookInLabel.textAndMnemonic=Suchen &in:
FileChooser.saveInLabelText=Speichern in:
FileChooser.fileNameLabel.textAndMnemonic=&Dateiname:
FileChooser.folderNameLabel.textAndMnemonic=Ordner&name:
FileChooser.filesOfTypeLabel.textAndMnemonic=Datei&typ:

# toolbar
FileChooser.upFolderToolTipText=Eine Ebene h\u00F6her
FileChooser.upFolderAccessibleName=Nach oben
FileChooser.homeFolderToolTipText=Home
FileChooser.homeFolderAccessibleName=Home
FileChooser.newFolderToolTipText=Neuen Ordner erstellen
FileChooser.newFolderAccessibleName=Neuer Ordner
FileChooser.listViewButtonToolTipText=Liste
FileChooser.listViewButtonAccessibleName=Liste
FileChooser.detailsViewButtonToolTipText=Details
FileChooser.detailsViewButtonAccessibleName=Details

# details table header
FileChooser.fileNameHeaderText=Name
FileChooser.fileSizeHeaderText=Gr\u00F6\u00DFe
FileChooser.fileTypeHeaderText=Typ
FileChooser.fileDateHeaderText=\u00C4nderungsdatum
FileChooser.fileAttrHeaderText=Attribute

# popup menu
FileChooser.viewMenuLabelText=Ansicht
FileChooser.refreshActionLabelText=Aktualisieren
FileChooser.newFolderActionLabelText=Neuer Ordner
FileChooser.listViewActionLabelText=Liste
FileChooser.detailsViewActionLabelText=Details
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#---- FileChooser ----

#fields
FileChooser.lookInLabel.textAndMnemonic=Rechercher &dans:
FileChooser.saveInLabelText=Enregistrer dans:
FileChooser.fileNameLabel.textAndMnemonic=&Nom du fichier:
FileChooser.folderNameLabel.textAndMnemonic=&Nom du dossier:
FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier:

# toolbar
FileChooser.upFolderToolTipText=Remonte d'un niveau
FileChooser.upFolderAccessibleName=Monter
FileChooser.homeFolderToolTipText=R\u00E9pertoire de base
FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base
FileChooser.newFolderToolTipText=Cr\u00E9e un dossier
FileChooser.newFolderAccessibleName=Nouveau dossier
FileChooser.listViewButtonToolTipText=Liste
FileChooser.listViewButtonAccessibleName=Liste
FileChooser.detailsViewButtonToolTipText=D\u00E9tails
FileChooser.detailsViewButtonAccessibleName=D\u00E9tails

# details table header
FileChooser.fileNameHeaderText=Nom
FileChooser.fileSizeHeaderText=Taille
FileChooser.fileTypeHeaderText=Type
FileChooser.fileDateHeaderText=Modifi\u00E9
FileChooser.fileAttrHeaderText=Attributs

# popup menu
FileChooser.viewMenuLabelText=Affichage
FileChooser.refreshActionLabelText=Actualiser
FileChooser.newFolderActionLabelText=Nouveau dossier
FileChooser.listViewActionLabelText=Liste
FileChooser.detailsViewActionLabelText=D\u00E9tails

0 comments on commit a9cfe69

Please sign in to comment.