mirror of
https://github.com/LucasVbr/LecteurPdfDoubleAffichage.git
synced 2026-07-09 20:57:44 +00:00
Modification du code des Popup + Ajout disposition Verticale et Horizontale
This commit is contained in:
@@ -46,17 +46,12 @@ public class PDF extends JPanel {
|
||||
* @param fichier Le fichier PDF que l’on veut ouvrir
|
||||
* @throws IllegalArgumentException si le fichier n’existe pas
|
||||
*/
|
||||
public PDF(File fichier) throws IOException{
|
||||
// try {
|
||||
this.document = PDDocument.load(fichier);
|
||||
this.pages = new Page[document.getNumberOfPages()];
|
||||
this.zoom = 1.0f;
|
||||
|
||||
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
||||
this.setAlignmentX(Component.CENTER_ALIGNMENT);
|
||||
// } catch (IOException e) {
|
||||
// throw new IllegalArgumentException();
|
||||
// }
|
||||
public PDF(File fichier, boolean vertical) throws IOException {
|
||||
document = PDDocument.load(fichier);
|
||||
pages = new Page[document.getNumberOfPages()];
|
||||
zoom = 1.0f;
|
||||
setAlignmentX(Component.CENTER_ALIGNMENT);
|
||||
if (vertical) setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user