MCPcopy Create free account
hub / github.com/ArtifexSoftware/mupdf / showInfo

Method showInfo

platform/java/example/Viewer.java:937–1107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

935 }
936
937 protected void showInfo() {
938 StringBuffer buffer;
939
940 cancelSearch();
941
942 final Dialog box = new Dialog(this, "Document info", true);
943 box.addWindowListener(new WindowListener() {
944 public void windowActivated(WindowEvent event) { }
945 public void windowDeactivated(WindowEvent event) { }
946 public void windowIconified(WindowEvent event) { }
947 public void windowDeiconified(WindowEvent event) { }
948 public void windowOpened(WindowEvent event) { }
949 public void windowClosed(WindowEvent event) { }
950 public void windowClosing(WindowEvent event) {
951 box.setVisible(false);
952 pageCanvas.requestFocusInWindow();
953 }
954 });
955
956 Panel infoPanel = new Panel();
957 int rows = 0;
958
959 if (title != null) rows++;
960
961 if (author != null) rows++;
962
963 if (format != null) rows++;
964
965 if (encryption != null) rows++;
966
967 buffer = new StringBuffer();
968 if (print)
969 buffer.append("print, ");
970 if (copy)
971 buffer.append("copy, ");
972 if (edit)
973 buffer.append("edit, ");
974 if (annotate)
975 buffer.append("annotate, ");
976 if (form)
977 buffer.append("form, ");
978 if (accessibility)
979 buffer.append("accessibility, ");
980 if (assemble)
981 buffer.append("assemble, ");
982 if (printHq)
983 buffer.append("print-hq, ");
984 if (buffer.length() > 2)
985 buffer.delete(buffer.length() - 2, buffer.length());
986 String permissions = buffer.length() > 0 ? buffer.toString() : null;
987 if (permissions != null) rows++;
988
989 buffer = new StringBuffer();
990 if (doc.equals("PDF")) {
991 buffer.append("PDF ");
992 if (linearized)
993 buffer.append("linearized ");
994 buffer.append("document with ");

Callers 1

canvasKeyTypedMethod · 0.95

Calls 9

cancelSearchMethod · 0.95
paperSizeNameMethod · 0.95
packMethod · 0.80
disposeMethod · 0.80
lengthMethod · 0.45
deleteMethod · 0.45
toStringMethod · 0.45
equalsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected