This repository has been archived by the owner on Jan 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changelog: http://itextpdf.com/changelog/558 Release Notes: http://itextpdf.com/release/iText558 Download: https://github.com/itext/rups/releases/tag/5.5.8
- Loading branch information
Showing
4 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
Building RUPS | ||
------------- | ||
|
||
Running a maven build without profile will just build the jar. | ||
Install a recent JDK, [Maven], and type: | ||
|
||
Running the build with profiles: | ||
``` | ||
mvn install | ||
``` | ||
|
||
Running a maven build without a profile will just build the jar. | ||
|
||
Running the build with profiles (`-P profile`): | ||
|
||
profile name | build actions | ||
------------ | ------------- | ||
all | generate jar, jar with dependencies in it, sources jar, javadoc jar | ||
exe | create a windows exe to run RUPS | ||
|
||
[maven]: http://maven.apache.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/main/java/com/itextpdf/rups/view/contextmenu/InspectObjectAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.itextpdf.rups.view.contextmenu; | ||
|
||
import com.itextpdf.rups.view.itext.PdfTree; | ||
import com.itextpdf.rups.view.itext.SyntaxHighlightedStreamPane; | ||
import com.itextpdf.rups.view.itext.treenodes.PdfObjectTreeNode; | ||
import com.itextpdf.text.pdf.PdfObject; | ||
|
||
import javax.swing.AbstractAction; | ||
import javax.swing.JComponent; | ||
import javax.swing.JFrame; | ||
import javax.swing.KeyStroke; | ||
|
||
import java.awt.Component; | ||
import java.awt.Dimension; | ||
import java.awt.Toolkit; | ||
import java.awt.event.ActionEvent; | ||
import java.awt.event.KeyEvent; | ||
|
||
/** | ||
* @author Michael Demey | ||
*/ | ||
public class InspectObjectAction extends AbstractRupsAction { | ||
|
||
private Component invoker; | ||
|
||
public InspectObjectAction(String name, Component invoker) { | ||
super(name); | ||
this.invoker = invoker; | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
final JFrame frame = new JFrame("Rups Object Inspection Window"); | ||
|
||
// defines the size and location | ||
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); | ||
frame.setSize((int)(screen.getWidth() * .70), (int)(screen.getHeight() * .70)); | ||
frame.setLocation((int)(screen.getWidth() * .05), (int)(screen.getHeight() * .05)); | ||
frame.setResizable(true); | ||
|
||
frame.setVisible(true); | ||
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); | ||
|
||
final PdfObject pdfObject = ( (PdfObjectTreeNode) ( (PdfTree) invoker ).getSelectionPath().getLastPathComponent() ).getPdfObject(); | ||
final SyntaxHighlightedStreamPane syntaxHighlightedStreamPane = new SyntaxHighlightedStreamPane(); | ||
|
||
frame.add(syntaxHighlightedStreamPane); | ||
syntaxHighlightedStreamPane.render(pdfObject); | ||
|
||
frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "Cancel"); | ||
frame.getRootPane().getActionMap().put("Cancel", new AbstractAction() { | ||
public void actionPerformed(ActionEvent e) { | ||
frame.dispose(); | ||
} | ||
}); | ||
|
||
if ( e.getSource() instanceof Component ) { | ||
frame.setLocationRelativeTo((Component) e.getSource()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters