001 /** 002 ############################################################################## 003 ## ## 004 ## Appearance3DChooser ## 005 ## ## 006 ## Copyright (C) 2009 Frederic Roudaut <frederic.roudaut@free.fr> ## 007 ## ## 008 ## ## 009 ## This program is free software: you can redistribute it and/or modify ## 010 ## it under the terms of the GNU General Public License as published by ## 011 ## the Free Software Foundation, either version 3 of the License, or ## 012 ## (at your option) any later version. ## 013 ## ## 014 ## This program is distributed in the hope that it will be useful, ## 015 ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## 016 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## 017 ## GNU General Public License for more details. ## 018 ## ## 019 ## You should have received a copy of the GNU General Public License ## 020 ## along with this program. If not, see <http://www.gnu.org/licenses/>. ## 021 ## ## 022 ## ## 023 ############################################################################## 024 **/ 025 026 027 028 package com.appearance3Dchooser; 029 030 import java.awt.GraphicsConfiguration; 031 import java.awt.GraphicsEnvironment; 032 import java.awt.BorderLayout; 033 import java.awt.GridBagLayout; 034 import java.awt.GridBagConstraints; 035 import java.awt.event.*; 036 import java.awt.Insets; 037 import java.awt.Font; 038 import java.awt.Dimension; 039 import java.util.Map; 040 import java.util.ResourceBundle; 041 import javax.swing.*; 042 import java.io.*; 043 import javax.swing.event.HyperlinkEvent; 044 045 import javax.media.j3d.Canvas3D; 046 import javax.media.j3d.GraphicsConfigTemplate3D; 047 import javax.media.j3d.VirtualUniverse; 048 049 import com.awt.GridBagLayoutConstraint; 050 051 052 053 /** 054 * An helpful class for tierce information, for showing 3D Info, a Help Page, an about panel ... 055 * 056 */ 057 public class Info 058 { 059 060 private static final long serialVersionUID = 1L; 061 062 /** 063 * The localized strings used in this (and related) panel(s). 064 */ 065 public static ResourceBundle ressources = ResourceBundle.getBundle("com.appearance3Dchooser.resources.Appearance3DChooser"); 066 /** 067 * The Frame used to show the GPL License. 068 */ 069 protected static JFrame licenseFrame; 070 071 /** 072 * Draw a Frame with some useful helps on Java3D. 073 * 074 */ 075 public static void showJava3DHelp() 076 { 077 showJava3DHelp(new Dimension(800, 800)); 078 } 079 080 /** 081 * Draw a Frame with some useful helps on Java3D. 082 * @param d the text Panel Dimension 083 * 084 */ 085 public static void showJava3DHelp(Dimension d) 086 { 087 final JFrame helpFrame; 088 JEditorPane helpPane = new JEditorPane(); 089 javax.swing.event.HyperlinkListener helpPaneListener; 090 091 helpPane.setEditable(false); 092 java.net.URL helpURL = (new Info()).getClass().getResource("resources/Appearance3DChooserHelp.html"); 093 if (helpURL != null) { 094 try { 095 helpPane.setPage(helpURL); 096 helpPane.setContentType("text/html"); 097 } catch (IOException e) { 098 System.err.println("Attempted to read a bad URL: " + helpURL); 099 } 100 } else { 101 System.err.println("Couldn't find file: Appearance3DChooserHelp.html"); 102 } 103 104 // Add a listener for following Links 105 helpPaneListener = new javax.swing.event.HyperlinkListener() { 106 public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent e) { 107 if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { 108 JEditorPane pane = (JEditorPane)e.getSource(); 109 try { 110 pane.setPage(e.getURL()); 111 }catch (IOException ex) { 112 pane.setText("Error : "+ ex.getMessage()); 113 } 114 } 115 } 116 }; 117 118 helpPane.addHyperlinkListener(helpPaneListener); 119 120 //Put the editor pane in a scroll pane. 121 JScrollPane helpScrollPane = new JScrollPane(helpPane); 122 helpScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); 123 helpScrollPane.setPreferredSize(d); 124 helpScrollPane.setMinimumSize(new Dimension(10, 10)); 125 126 helpFrame= new JFrame(Info.ressources.getObject("Help").toString()); 127 GridBagLayout gb = new GridBagLayout(); 128 helpFrame.setLayout(gb); 129 helpFrame.add(helpScrollPane); 130 gb.setConstraints(helpScrollPane, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,0, 131 new Insets(15,15,15,15))); 132 133 JButton okbutton = new JButton(Info.ressources.getObject("OK").toString()); 134 helpFrame.add(okbutton); 135 gb.setConstraints(okbutton, new GridBagLayoutConstraint(GridBagConstraints.EAST,0,1, 136 new Insets(15,8,8,8))); 137 okbutton.addActionListener(new ActionListener() { 138 public void actionPerformed(ActionEvent e) { 139 helpFrame.setVisible(false); 140 helpFrame.dispose(); 141 } 142 }); 143 144 145 helpFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 146 helpFrame.pack(); 147 helpFrame.setVisible(true); 148 } 149 150 151 /** 152 * Draw a Frame with the version, author and content information. 153 * 154 */ 155 public static void showAbout() 156 { 157 final JFrame aboutFrame = new JFrame(Info.ressources.getObject("About").toString()); 158 JPanel aboutPanel = new JPanel(new BorderLayout()); 159 JPanel gplPanel = new JPanel(new BorderLayout()); 160 aboutFrame.getContentPane().add(aboutPanel, BorderLayout.CENTER); 161 JPanel textPanel = new JPanel(); 162 aboutPanel.add(textPanel, BorderLayout.EAST); 163 GridBagLayout gb; 164 165 java.net.URL url = (new Info()).getClass().getResource("resources/about.png"); 166 if (url != null) { 167 ImageIcon aboutPicture = new ImageIcon(url, "Appearance 3D Chooser"); 168 if (aboutPicture != null) { 169 JLabel aboutLabel = new JLabel(aboutPicture); 170 JPanel aboutPicturePanel = new JPanel(); 171 gb = new GridBagLayout(); 172 aboutPicturePanel.setLayout(gb); 173 aboutPicturePanel.add(aboutLabel, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,0, 174 new Insets(8,8,8,15))); 175 aboutPanel.add(aboutPicturePanel, BorderLayout.WEST); 176 } 177 } 178 179 gb = new GridBagLayout(); 180 textPanel.setLayout(gb); 181 JLabel entryText = new JLabel("Appearance3DChooser"); 182 entryText.setFont(new Font("SansSerif", Font.BOLD, 18)); 183 textPanel.add(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,0, 184 new Insets(60,15,0,15)) ); 185 entryText = new JLabel(Info.ressources.getObject("Appearance3DChooserVersion").toString()); 186 entryText.setFont(new Font("SansSerif", Font.PLAIN, 12)); 187 textPanel.add(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,1, 188 new Insets(0,15,0,15)) ); 189 190 entryText = new JLabel(Info.ressources.getObject("About_content1").toString()); 191 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 192 textPanel.add(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,2, 193 new Insets(30,15,0,15)) ); 194 entryText = new JLabel(Info.ressources.getObject("About_content2").toString()); 195 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 196 textPanel.add(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,3, 197 new Insets(0,15,0,15)) ); 198 entryText = new JLabel(Info.ressources.getObject("About_content3").toString()); 199 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 200 textPanel.add(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,4, 201 new Insets(30,15,0,15)) ); 202 entryText = new JLabel(Info.ressources.getObject("About_content4").toString()); 203 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 204 textPanel.add(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,5, 205 new Insets(30,15,0,15)) ); 206 entryText = new JLabel(Info.ressources.getObject("About_content5").toString()); 207 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 208 textPanel.add(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,6, 209 new Insets(0,15,0,15)) ); 210 211 212 url = (new Info()).getClass().getResource("resources/gplv3.png"); 213 if (url != null) { 214 ImageIcon gplPicture = new ImageIcon(url, "License"); 215 if (gplPicture != null) { 216 JLabel gplLabel = new JLabel(gplPicture); 217 JPanel gplPicturePanel = new JPanel(); 218 gb = new GridBagLayout(); 219 gplPicturePanel.setLayout(gb); 220 gplPicturePanel.add(gplLabel, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,0, 221 new Insets(5,10,0,0))); 222 gplPanel.add(gplPicturePanel, BorderLayout.WEST); 223 createLicense(); 224 gplLabel.addMouseListener(new MouseListener() { 225 public void mouseClicked(MouseEvent e) { 226 licenseFrame.setVisible(!licenseFrame.isVisible()); 227 } 228 public void mouseExited(MouseEvent e) { 229 } 230 public void mouseEntered(MouseEvent e) { 231 } 232 public void mousePressed(MouseEvent e) { 233 } 234 public void mouseReleased(MouseEvent e) { 235 } 236 }); 237 } 238 } 239 textPanel.add(gplPanel, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,7, 240 new Insets(0,0,0,0)) ); 241 242 JButton okbutton = new JButton(Info.ressources.getObject("OK").toString()); 243 textPanel.add(okbutton, new GridBagLayoutConstraint(GridBagConstraints.EAST,0,9, new Insets(90,8,8,8))); 244 okbutton.addActionListener(new ActionListener() { 245 public void actionPerformed(ActionEvent e) { 246 aboutFrame.setVisible(false); 247 aboutFrame.dispose(); 248 } 249 }); 250 251 aboutFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 252 aboutFrame.setResizable(false); 253 aboutFrame.pack(); 254 aboutFrame.setVisible(true); 255 } 256 257 258 259 /** 260 * Create a Frame for showing GPL License. 261 * 262 */ 263 protected static void createLicense() 264 { 265 createLicense(new Dimension(650, 800)); 266 } 267 268 269 /** 270 * Create a Frame for showing GPL License. 271 * @param d the text Panel Dimension 272 * 273 */ 274 protected static void createLicense(Dimension d) 275 { 276 licenseFrame = new JFrame("GPL"); 277 JTextArea text = new JTextArea(); 278 JPanel textPanel = new JPanel(); 279 JPanel licensePanel = new JPanel(); 280 GridBagLayout gb = new GridBagLayout(); 281 licensePanel.setLayout(gb); 282 283 text.setFont(new Font("SansSerif", Font.PLAIN, 12)); 284 InputStream ips = (new Info()).getClass().getResourceAsStream("resources/license.txt"); 285 if (ips != null) 286 { 287 try 288 { 289 InputStreamReader ipsr=new InputStreamReader(ips); 290 BufferedReader br=new BufferedReader(ipsr); 291 String ligne; 292 String textContent = ""; 293 while ((ligne = br.readLine())!= null) 294 { 295 textContent+= "\t" + ligne + "\n"; 296 } 297 298 text.append(textContent); 299 } 300 catch ( Exception e) 301 { 302 System.err.println("Error : License File not found "); 303 } 304 } 305 306 text.setCaretPosition(0); 307 JScrollPane textScrolled = new JScrollPane(text); 308 textScrolled.setPreferredSize(d); 309 textPanel.add(textScrolled); 310 licensePanel.add(textPanel); 311 gb.setConstraints(textPanel, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,0, 312 new Insets(15,15,15,15))); 313 314 315 JButton okbutton = new JButton(Info.ressources.getObject("OK").toString()); 316 licensePanel.add(okbutton); 317 gb.setConstraints(okbutton, new GridBagLayoutConstraint(GridBagConstraints.EAST,0,1, 318 new Insets(15,8,8,8))); 319 okbutton.addActionListener(new ActionListener() { 320 public void actionPerformed(ActionEvent e) { 321 licenseFrame.setVisible(false); 322 licenseFrame.dispose(); 323 } 324 }); 325 326 327 328 licenseFrame.getContentPane().add(licensePanel); 329 licenseFrame.pack(); 330 licenseFrame.setVisible(false); 331 } 332 333 334 /** 335 * Draw a Frame with some useful information on Java3D and your 3D Characteristics. 336 * 337 */ 338 public static void show3DInfo() { 339 show3DInfo(new Dimension(580, 500)); 340 } 341 342 /** 343 * Draw a Frame with some useful information on Java3D and your 3D Characteristics. 344 * @param d the text Panel Dimension 345 * 346 */ 347 public static void show3DInfo(Dimension d) 348 { 349 Map vuMap = VirtualUniverse.getProperties(); 350 GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D(); 351 template.setStereo(GraphicsConfigTemplate3D.PREFERRED); 352 template.setSceneAntialiasing(GraphicsConfigTemplate3D.REQUIRED); 353 template.setDoubleBuffer(GraphicsConfigTemplate3D.PREFERRED); 354 GraphicsConfiguration config = GraphicsEnvironment 355 .getLocalGraphicsEnvironment().getDefaultScreenDevice() 356 .getBestConfiguration(template); 357 Map c3dMap = new Canvas3D(config).queryProperties(); 358 359 final JFrame show3DBox = new JFrame(Info.ressources.getObject("About_Java3D").toString()); 360 show3DBox.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 361 show3DBox.setVisible(true); 362 363 JPanel show3DPanel = new JPanel(new BorderLayout()); 364 JLabel entryText; 365 366 JPanel textPanel = new JPanel(); 367 show3DPanel.add(textPanel, BorderLayout.WEST); 368 GridBagLayout gb = new GridBagLayout(); 369 textPanel.setLayout(gb); 370 371 entryText = new JLabel(Info.ressources.getObject("Version").toString()); 372 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 373 textPanel.add(entryText); 374 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,0, 375 new Insets(0,15,0,15))); 376 377 entryText = new JLabel("= " + vuMap.get("j3d.version")); 378 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 379 textPanel.add(entryText); 380 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,0, 381 new Insets(0,8,0,15))); 382 383 entryText = new JLabel(Info.ressources.getObject("Vendor").toString()); 384 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 385 textPanel.add(entryText); 386 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,1, 387 new Insets(0,15,0,15))); 388 389 entryText = new JLabel("= " + vuMap.get("j3d.vendor")); 390 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 391 textPanel.add(entryText); 392 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,1, 393 new Insets(0,8,0,15))); 394 395 entryText = new JLabel(Info.ressources.getObject("Specification_Version").toString()); 396 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 397 textPanel.add(entryText); 398 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,2, 399 new Insets(0,15,0,15))); 400 401 entryText = new JLabel("= " + vuMap.get("j3d.specification.version")); 402 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 403 textPanel.add(entryText); 404 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,2, 405 new Insets(0,8,0,15))); 406 407 entryText = new JLabel(Info.ressources.getObject("Specification_Vendor").toString()); 408 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 409 textPanel.add(entryText); 410 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,3, 411 new Insets(0,15,0,15))); 412 413 entryText = new JLabel("= " + vuMap.get("j3d.specification.vendor")); 414 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 415 textPanel.add(entryText); 416 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,3, 417 new Insets(0,8,0,15))); 418 419 420 421 entryText = new JLabel(Info.ressources.getObject("Rendering_Pipeline").toString()); 422 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 423 textPanel.add(entryText); 424 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,4, 425 new Insets(0,15,0,15))); 426 427 entryText = new JLabel("= " + vuMap.get("j3d.pipeline")); 428 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 429 textPanel.add(entryText); 430 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,4, 431 new Insets(0,8,0,15))); 432 433 434 entryText = new JLabel(Info.ressources.getObject("Rendering_Library").toString()); 435 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 436 textPanel.add(entryText); 437 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,5, 438 new Insets(0,15,0,15))); 439 440 entryText = new JLabel("= " + vuMap.get("j3d.renderer")); 441 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 442 textPanel.add(entryText); 443 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,5, 444 new Insets(0,8,0,15))); 445 446 447 entryText = new JLabel(Info.ressources.getObject("Rendering_Version").toString()); 448 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 449 textPanel.add(entryText); 450 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,6, 451 new Insets(0,15,0,15))); 452 453 entryText = new JLabel("= " + c3dMap.get("native.version")); 454 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 455 textPanel.add(entryText); 456 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,6, 457 new Insets(0,8,0,15))); 458 459 entryText = new JLabel(Info.ressources.getObject("doubleBufferAvailable").toString()); 460 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 461 textPanel.add(entryText); 462 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,7, 463 new Insets(0,15,0,15))); 464 465 entryText = new JLabel("= " + c3dMap.get("doubleBufferAvailable")); 466 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 467 textPanel.add(entryText); 468 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,7, 469 new Insets(0,8,0,15))); 470 471 entryText = new JLabel(Info.ressources.getObject("stereoAvailable").toString()); 472 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 473 textPanel.add(entryText); 474 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,8, 475 new Insets(0,15,0,15))); 476 477 entryText = new JLabel("= " + c3dMap.get("stereoAvailable")); 478 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 479 textPanel.add(entryText); 480 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,8, 481 new Insets(0,8,0,15))); 482 483 entryText = new JLabel(Info.ressources.getObject("sceneAntialiasingAvailable").toString()); 484 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 485 textPanel.add(entryText); 486 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,9, 487 new Insets(0,15,0,15))); 488 489 entryText = new JLabel("= " + c3dMap.get("sceneAntialiasingAvailable")); 490 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 491 textPanel.add(entryText); 492 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,9, 493 new Insets(0,8,0,15))); 494 495 entryText = new JLabel(Info.ressources.getObject("sceneAntialiasingNumPasses").toString()); 496 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 497 textPanel.add(entryText); 498 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,10, 499 new Insets(0,15,0,15))); 500 501 entryText = new JLabel("= " + c3dMap.get("sceneAntialiasingNumPasses")); 502 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 503 textPanel.add(entryText); 504 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,10, 505 new Insets(0,8,0,15))); 506 507 entryText = new JLabel(Info.ressources.getObject("textureColorTableSize").toString()); 508 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 509 textPanel.add(entryText); 510 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,11, 511 new Insets(0,15,0,15))); 512 513 entryText = new JLabel("= " + c3dMap.get("textureColorTableSize")); 514 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 515 textPanel.add(entryText); 516 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,11, 517 new Insets(0,8,0,15))); 518 519 entryText = new JLabel(Info.ressources.getObject("textureEnvCombineAvailable").toString()); 520 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 521 textPanel.add(entryText); 522 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,12, 523 new Insets(0,15,0,15))); 524 525 entryText = new JLabel("= " + c3dMap.get("textureEnvCombineAvailable")); 526 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 527 textPanel.add(entryText); 528 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,12, 529 new Insets(0,8,0,15))); 530 531 entryText = new JLabel(Info.ressources.getObject("textureCombineDot3Available").toString()); 532 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 533 textPanel.add(entryText); 534 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,13, 535 new Insets(0,15,0,15))); 536 537 entryText = new JLabel("= " + c3dMap.get("textureCombineDot3Available")); 538 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 539 textPanel.add(entryText); 540 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,13, 541 new Insets(0,8,0,15))); 542 543 entryText = new JLabel(Info.ressources.getObject("textureCombineSubtractAvailable").toString()); 544 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 545 textPanel.add(entryText); 546 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,14, 547 new Insets(0,15,0,15))); 548 549 entryText = new JLabel("= " + c3dMap.get("textureCombineSubtractAvailable")); 550 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 551 textPanel.add(entryText); 552 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,14, 553 new Insets(0,8,0,15))); 554 555 entryText = new JLabel(Info.ressources.getObject("texture3DAvailable").toString()); 556 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 557 textPanel.add(entryText); 558 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,15, 559 new Insets(0,15,0,15))); 560 561 entryText = new JLabel("= " + c3dMap.get("texture3DAvailable")); 562 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 563 textPanel.add(entryText); 564 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,15, 565 new Insets(0,8,0,15))); 566 567 entryText = new JLabel(Info.ressources.getObject("textureCubeMapAvailable").toString()); 568 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 569 textPanel.add(entryText); 570 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,16, 571 new Insets(0,15,0,15))); 572 573 entryText = new JLabel("= " + c3dMap.get("textureCubeMapAvailable")); 574 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 575 textPanel.add(entryText); 576 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,16, 577 new Insets(0,8,0,15))); 578 579 entryText = new JLabel(Info.ressources.getObject("textureSharpenAvailable").toString()); 580 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 581 textPanel.add(entryText); 582 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,17, 583 new Insets(0,15,0,15))); 584 585 entryText = new JLabel("= " + c3dMap.get("textureSharpenAvailable")); 586 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 587 textPanel.add(entryText); 588 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,17, 589 new Insets(0,8,0,15))); 590 591 entryText = new JLabel(Info.ressources.getObject("textureFilter4Available").toString()); 592 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 593 textPanel.add(entryText); 594 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,18, 595 new Insets(0,15,0,15))); 596 597 entryText = new JLabel("= " + c3dMap.get("textureFilter4Available")); 598 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 599 textPanel.add(entryText); 600 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,18, 601 new Insets(0,8,0,15))); 602 603 entryText = new JLabel(Info.ressources.getObject("textureDetailAvailable").toString()); 604 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 605 textPanel.add(entryText); 606 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,19, 607 new Insets(0,15,0,15))); 608 609 entryText = new JLabel("= " + c3dMap.get("textureDetailAvailable")); 610 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 611 textPanel.add(entryText); 612 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,19, 613 new Insets(0,8,0,15))); 614 615 entryText = new JLabel(Info.ressources.getObject("textureAnisotropicFilterDegreeMax").toString()); 616 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 617 textPanel.add(entryText); 618 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,20, 619 new Insets(0,15,0,15))); 620 621 entryText = new JLabel("= " + c3dMap.get("textureAnisotropicFilterDegreeMax")); 622 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 623 textPanel.add(entryText); 624 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,20, 625 new Insets(0,8,0,15))); 626 627 entryText = new JLabel(Info.ressources.getObject("textureBoundaryWidthMax").toString()); 628 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 629 textPanel.add(entryText); 630 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,21, 631 new Insets(0,15,0,15))); 632 633 entryText = new JLabel("= " + c3dMap.get("textureBoundaryWidthMax")); 634 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 635 textPanel.add(entryText); 636 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,21, 637 new Insets(0,8,0,15))); 638 639 entryText = new JLabel(Info.ressources.getObject("textureWidthMax").toString()); 640 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 641 textPanel.add(entryText); 642 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,22, 643 new Insets(0,15,0,15))); 644 645 entryText = new JLabel("= " + c3dMap.get("textureWidthMax")); 646 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 647 textPanel.add(entryText); 648 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,22, 649 new Insets(0,8,0,15))); 650 651 entryText = new JLabel(Info.ressources.getObject("textureHeightMax").toString()); 652 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 653 textPanel.add(entryText); 654 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,23, 655 new Insets(0,15,0,15))); 656 657 entryText = new JLabel("= " + c3dMap.get("textureHeightMax")); 658 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 659 textPanel.add(entryText); 660 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,23, 661 new Insets(0,8,0,15))); 662 663 entryText = new JLabel(Info.ressources.getObject("textureLodOffsetAvailable").toString()); 664 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 665 textPanel.add(entryText); 666 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,24, 667 new Insets(0,15,0,15))); 668 669 entryText = new JLabel("= " + c3dMap.get("textureLodOffsetAvailable")); 670 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 671 textPanel.add(entryText); 672 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,24, 673 new Insets(0,8,0,15))); 674 675 entryText = new JLabel(Info.ressources.getObject("textureLodRangeAvailable").toString()); 676 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 677 textPanel.add(entryText); 678 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,25, 679 new Insets(0,15,0,15))); 680 681 entryText = new JLabel("= " + c3dMap.get("textureLodRangeAvailable")); 682 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 683 textPanel.add(entryText); 684 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,25, 685 new Insets(0,8,0,15))); 686 687 entryText = new JLabel(Info.ressources.getObject("textureUnitStateMax").toString()); 688 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 689 textPanel.add(entryText); 690 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,26, 691 new Insets(0,15,0,15))); 692 693 entryText = new JLabel("= " + c3dMap.get("textureUnitStateMax")); 694 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 695 textPanel.add(entryText); 696 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,26, 697 new Insets(0,8,0,15))); 698 699 entryText = new JLabel(Info.ressources.getObject("compressedGeometry.majorVersionNumber").toString()); 700 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 701 textPanel.add(entryText); 702 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,27, 703 new Insets(0,15,0,15))); 704 705 entryText = new JLabel("= " + c3dMap.get("compressedGeometry.majorVersionNumber")); 706 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 707 textPanel.add(entryText); 708 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,27, 709 new Insets(0,8,0,15))); 710 711 entryText = new JLabel(Info.ressources.getObject("compressedGeometry.minorVersionNumber").toString()); 712 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 713 textPanel.add(entryText); 714 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,28, 715 new Insets(0,15,0,15))); 716 717 entryText = new JLabel("= " + c3dMap.get("compressedGeometry.minorVersionNumber")); 718 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 719 textPanel.add(entryText); 720 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,28, 721 new Insets(0,8,0,15))); 722 723 entryText = new JLabel(Info.ressources.getObject("compressedGeometry.minorMinorVersionNumber").toString()); 724 entryText.setFont(new Font("SansSerif", Font.BOLD, 11)); 725 textPanel.add(entryText); 726 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,0,29, 727 new Insets(0,15,0,15))); 728 729 entryText = new JLabel("= " + c3dMap.get("compressedGeometry.minorMinorVersionNumber")); 730 entryText.setFont(new Font("SansSerif", Font.PLAIN, 10)); 731 textPanel.add(entryText); 732 gb.setConstraints(entryText, new GridBagLayoutConstraint(GridBagConstraints.WEST,1,29, 733 new Insets(0,8,0,15))); 734 735 736 JScrollPane textScrolled = new JScrollPane(textPanel); 737 textScrolled.setPreferredSize(d); 738 show3DPanel.add(textScrolled, BorderLayout.WEST); 739 GridBagLayout gbMain = new GridBagLayout(); 740 show3DPanel.setLayout(gbMain); 741 show3DPanel.add(textScrolled); 742 GridBagConstraints gbc = new GridBagLayoutConstraint(GridBagConstraints.EAST,0,0, 743 new Insets(15,15,15,15)); 744 gbc.gridwidth = 2; 745 gbMain.setConstraints(textScrolled, gbc); 746 747 748 JButton okbutton = new JButton(Info.ressources.getObject("OK").toString()); 749 show3DPanel.add(okbutton); 750 gbMain.setConstraints(okbutton, new GridBagLayoutConstraint(GridBagConstraints.EAST,1,1, 751 new Insets(15,8,8,8))); 752 okbutton.addActionListener(new ActionListener() { 753 public void actionPerformed(ActionEvent e) { 754 show3DBox.setVisible(false); 755 show3DBox.dispose(); 756 } 757 }); 758 759 show3DBox.getContentPane().add(show3DPanel, BorderLayout.CENTER); 760 show3DBox.pack(); 761 show3DBox.setResizable(false); 762 show3DBox.setVisible(true); 763 } 764 765 }