guiffy.inside

The guiffy.inside package provides an API for building Guiffy inside Java applications. Classes are prvided for GUI and non-GUI applications.

guiffy.inside GUI classes:

The class GuiffyFrame is the GUI component for Guiffy. GuiffyFrame extends JFrame.
The javadoc for GuiffyFrame documents the Guiffy GUI component class and all its methods.

The class GuiffyPanel is another GUI component for Guiffy. GuiffyPanel extends JPanel and allows for integration with Guiffy (without Guiffy's Menu or Tool bars).
The javadoc for GuiffyPanel documents the Guiffy GUI Panel component class and all its methods.

guiffy.inside non-GUI classes:

The class GuiffyDiff provides an API (non-GUI) for Guiffy's "diff" and verify methods. GuiffyDiff is an extended Thread.
The javadoc for GuiffyDiff documents the Guiffy "diff" class and all its methods. The javadoc includes example code.

The class GuiffyFileTreeDiff reads GuiffyDiff output from folder/filetree compares and builds Lists of files Matching, Deleted, Added, and Changed.
The javadoc for GuiffyFileTreeDiff documents the GuiffyFileTreeDiff class and all its methods. The javadoc includes example code.

The class GuiffyReport provides an API (non-GUI) for creating Compare Reports as HTML. GuiffyReport is an extended Thread.
The javadoc for GuiffyReport documents the GuiffyReport class and all its methods. The javadoc includes example code.

The class GuiffySureMerge provides an API for performing SureMerges without a GUI. GuiffySureMerge is an extended Thread.
The javadoc for GuiffySureMerge documents the Guiffy SureMerge class and all its methods. The javadoc includes example code.

The class GuiffyUPatch provides an API (non-GUI) for performing patches with Unified Diff patch files. GuiffyUPatch is an extended Thread.
The javadoc for GuiffyUPatch documents the GuiffyUPatch class and all its methods. The javadoc includes example code.

guiffy.inside exit interface:

The interface GuiffyExit is for adding a user hook method called when a guiffy.inside class exits.
The javadoc for GuiffyExit documents the interface for adding a user hook method called when GuiffyFrame, GuiffySureMerge, GuiffyReport, or GuiffyUPatch exits.

Getting started:

To get started... Add the Guiffy.jar, Guiffy3p.jar, GuiffyID.jar, GuiffyBD.jar, and jh.jar files (in Guiffy's install folder) to your CLASSPATH.

Then, Add code such as in the example below to your Java application:

import com.guiffy.inside.*;
...
    prop = new Properties(System.getProperties() );
    String OSName = prop.getProperty( "os.name" );
    if(OSName.startsWith("Mac")) {
      System.setProperty("apple.laf.useScreenMenuBar", "true" );
      System.setProperty("apple.awt.application.name", "guiffy");
      // auto dark mode for JFrame and JDialog window headers
      System.setProperty("apple.awt.application.appearance", "system");
    } else if(OSName.startsWith("Win")) {
      // auto UI Scale
      System.setProperty("sun.java2d.uiScale.enabled","true");
    }

    try {
      if(OSName.startsWith("Mac")) {
        if(DarkMode) {
          UIManager.setLookAndFeel("com.formdev.flatlaf.FlatDarkLaf");
        } else {
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
      } else if(OSName.startsWith("Windows")) {
        if(DarkMode) {
          UIManager.setLookAndFeel("com.formdev.flatlaf.FlatDarkLaf");
        } else {
          UIManager.setLookAndFeel("com.formdev.flatlaf.FlatLightLaf");
        }
      } else if(OSName.startsWith("Linux")) {
        if(DarkMode) {
          UIManager.setLookAndFeel("com.formdev.flatlaf.FlatDarkLaf");
        } else {
          UIManager.setLookAndFeel("com.formdev.flatlaf.FlatLightLaf");
        }
      } else if(OSName.startsWith("AIX") ||
                OSName.startsWith("HP-UX") ||
                OSName.startsWith("SunOS") ) {
          UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
      } else {
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      }
    } catch (Exception exc) {
      System.err.println("Error loading L&F: " + exc );
    }
...
    GuiffyFrame gf = new GuiffyFrame (false);
...
    if ( SecfileName == null ) {
      // Show the Guiffy "Ready" 
      gf.setVisible(true);
      System.err.println("Here I am, after 'Ready'(no files speced)");
      return;
    }
...
    gf.set1stFile( FirfileName );
    gf.set2ndFile( SecfileName );
    // DO A COMPARE 
    try { 
      gf.compareFiles(true);
    }
    catch (Exception e) { System.err.println ( e.toString() ); }
    System.err.println("Here I am, after compareFiles()");
...


That's "IT" - you're all guiffy inside! ;-)

Documentation by Guiffy Software, Inc. 2022