From 14cccfab8111c61bf6707eef423abe79e95f5572 Mon Sep 17 00:00:00 2001 From: Robert Antoni Buj i Gelonch Date: Thu, 9 Oct 2014 13:02:21 +0200 Subject: [PATCH] As of JDK version 1.5, show() and hide() in Dialog have been deprecated Change-Id: If96e40ebe2c59f31ca4e2b81c6583eb7f8d5ec81 Reviewed-on: https://gerrit.libreoffice.org/11873 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- toolkit/test/accessibility/AccessibleSelectionHandler.java | 3 ++- toolkit/test/accessibility/AccessibleTextHandler.java | 4 ++-- toolkit/test/accessibility/SelectionDialog.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/toolkit/test/accessibility/AccessibleSelectionHandler.java b/toolkit/test/accessibility/AccessibleSelectionHandler.java index 546bd6913941..2d4f64f5d44d 100644 --- a/toolkit/test/accessibility/AccessibleSelectionHandler.java +++ b/toolkit/test/accessibility/AccessibleSelectionHandler.java @@ -140,6 +140,7 @@ class AccessibleSelectionHandler @Override public void performAction (AccessibleTreeNode aNode, int nIndex) { - new SelectionDialog( (AccTreeNode)aNode ).show(); + SelectionDialog selectionDialog = new SelectionDialog( (AccTreeNode)aNode ); + selectionDialog.setVisible(true); } } diff --git a/toolkit/test/accessibility/AccessibleTextHandler.java b/toolkit/test/accessibility/AccessibleTextHandler.java index 21902535a9d6..d29eefdab6ae 100644 --- a/toolkit/test/accessibility/AccessibleTextHandler.java +++ b/toolkit/test/accessibility/AccessibleTextHandler.java @@ -480,7 +480,7 @@ class AccessibleTextHandler extends NodeHandler } if( aDialog != null ) - aDialog.show(); + aDialog.setVisible(true); } } @@ -550,7 +550,7 @@ abstract class TextActionDialog extends JDialog void cancel() { - hide(); + setVisible(false); dispose(); } diff --git a/toolkit/test/accessibility/SelectionDialog.java b/toolkit/test/accessibility/SelectionDialog.java index 5ca8ca846654..10d8413b29f5 100644 --- a/toolkit/test/accessibility/SelectionDialog.java +++ b/toolkit/test/accessibility/SelectionDialog.java @@ -134,7 +134,7 @@ class SelectionDialog extends JDialog void close () { - hide(); + setVisible(false); dispose(); }