Skip to content

Adding a Project View to the Arduino IDE #11048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Ajout de l'icone folder + message de la perspective projet
  • Loading branch information
fati1998 committed Dec 3, 2020
commit 7883dfe17c80f8ede862eeb8568d6e2235867c61
22 changes: 15 additions & 7 deletions app/src/processing/app/EditorProject.java
Original file line number Diff line number Diff line change
@@ -3,15 +3,17 @@
import processing.app.tools.jexplorer.JExplorerPanel;

import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.io.IOException;

import static java.awt.Color.RED;
import static processing.app.I18n.tr;


public class EditorProject extends Panel implements ActionListener, MouseListener{

@@ -35,7 +37,7 @@ public class EditorProject extends Panel implements ActionListener, MouseListene

private Label buttons_popup;

public EditorProject(String path, Base base, Editor editor){
public EditorProject(String path, Base base, Editor editor) throws IOException {
this.setLayout(new BorderLayout());
fileRoot = new File(path);
this.base = base;
@@ -49,18 +51,23 @@ public EditorProject(String path, Base base, Editor editor){
settingsbox.setOpaque(true);
settingsbox.setBackground(new Color(23, 161, 165));
this.path = path;
settings = new JButton("S");

Icon img = new ImageIcon(new ImageIcon("folder1.jpg").getImage().getScaledInstance(35, 30, Image.SCALE_DEFAULT));
settings = new JButton(img);


settings.setPreferredSize(new Dimension(25, 5));
settings.addActionListener(this);
settings.addMouseListener(this);
toggle = new JButton("T");
toggle.addActionListener(this);
toggle.addMouseListener(this);
this.add(settings);
//this.add(settings);
//settingsbox.add(new Label("Project View"));
JPanel buttons_panel = new JPanel();
buttons_panel.setLayout(new FlowLayout());
buttons_panel.setOpaque(false);

//settingsbox.setBackground(Color.WHITE);
settingsbox.add(settings);
settingsbox.add(toggle);
settingsbox.add(buttons_popup);
@@ -78,6 +85,7 @@ public void resetProject(){

// Resetting the sketchbook path
PreferencesData.set("sketchbook.path", path);
editor.statusNotice(tr("Workspace moved to :")+path);
}


Binary file added build/folder1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Oops, something went wrong.