Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .classpath

This file was deleted.

17 changes: 0 additions & 17 deletions .project

This file was deleted.

2 changes: 0 additions & 2 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

11 changes: 0 additions & 11 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

Binary file removed lib/substance.jar
Binary file not shown.
Binary file removed lib/trident.jar
Binary file not shown.
66 changes: 66 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ms509</groupId>
<artifactId>Cknife</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>Cknife</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.pushing-pixels</groupId>
<artifactId>radiance-substance</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.pushing-pixels</groupId>
<artifactId>radiance-trident</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.41.2.2</version>
</dependency>
<dependency>
<groupId>org.pushing-pixels</groupId>
<artifactId>radiance-neon</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
<!-- maven-compiler-plugin -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.ms509.ui.Cknife</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public Component getTreeCellRendererComponent(JTree tree, Object value,
ImageIcon icon = null;
switch (data.nodetype) {
case DataType.DATABASE:
icon = new ImageIcon(getClass().getResource("/com/ms509/images/database.png"));
icon = new ImageIcon(getClass().getResource("/database.png"));
break;
case DataType.TABLE:
icon = new ImageIcon(getClass().getResource("/com/ms509/images/table.png"));
icon = new ImageIcon(getClass().getResource("/table.png"));
break;
}
this.setIcon(icon);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public Component getTreeCellRendererComponent(JTree tree, Object value,
}
if(df.getUserObject().equals("/") || al.contains(df.getUserObject()))
{
this.setIcon(new ImageIcon(getClass().getResource("/com/ms509/images/drive.png")));
this.setIcon(new ImageIcon(getClass().getResource("/drive.png")));
} else
{
this.setIcon(new ImageIcon(getClass().getResource("/com/ms509/images/folder.png")));
this.setIcon(new ImageIcon(getClass().getResource("/folder.png")));
}
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public void paintComponent(Graphics g) {
// TODO Auto-generated method stub
if(this.name.equals("isdict"))
{
g.drawImage(new ImageIcon(getClass().getResource("/com/ms509/images/folder.png")).getImage(),0,0,null);
g.drawImage(new ImageIcon(getClass().getResource("/folder.png")).getImage(),0,0,null);
}else
{
g.drawImage(new ImageIcon(getClass().getResource("/com/ms509/images/file.png")).getImage(),0,0,null);
g.drawImage(new ImageIcon(getClass().getResource("/file.png")).getImage(),0,0,null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public void paintComponent(Graphics g) {
// g.setColor(fore);
if(name.equals("/"))
{
g.drawImage(new ImageIcon(getClass().getResource("/com/ms509/images/drive.png")).getImage(),1,2,null);
g.drawImage(new ImageIcon(getClass().getResource("/drive.png")).getImage(),1,2,null);

}else
{
g.drawImage(new ImageIcon(getClass().getResource("/com/ms509/images/folder.png")).getImage(),1,2,null);
g.drawImage(new ImageIcon(getClass().getResource("/folder.png")).getImage(),1,2,null);
}

g.drawString(this.name,20,14);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ public RightTableModel(String[] filedicts) {
if (name.charAt(s[0].length() - 1) == '/') {
// data.add("isdict");
data.add(new ImageIcon(getClass().getResource(
"/com/ms509/images/folder.png")));
"/folder.png")));
data.add(name.substring(0, name.length() - 1));
data.add(s[1]);
data.add(s[2]);
data.add(s[3]);
} else {
// data.add("isfile");
data.add(new ImageIcon(getClass().getResource(
"/com/ms509/images/file.png")));
"/file.png")));
data.add(name);
data.add(s[1]);
data.add(s[2]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private void setComponent() {
img_label = new JLabel();

try {
icon = new ImageIcon(getClass().getResource("/com/ms509/images/logo.png"));
icon = new ImageIcon(getClass().getResource("/logo.png"));
} catch (Exception e1) {
e1.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import javax.swing.JFrame;
import javax.swing.UIManager;

import org.pushingpixels.substance.api.SubstanceLookAndFeel;
import org.pushingpixels.substance.internal.fonts.DefaultGnomeFontPolicy;
import org.pushingpixels.substance.internal.fonts.DefaultKDEFontPolicy;
import org.pushingpixels.substance.internal.fonts.DefaultMacFontPolicy;
import org.pushingpixels.neon.internal.font.DefaultMacFontPolicy;
import org.pushingpixels.neon.internal.font.DefaultKDEFontPolicy;
import org.pushingpixels.substance.api.SubstanceCortex;


import com.ms509.util.Configuration;
import com.ms509.util.InitConfig;
Expand Down Expand Up @@ -45,14 +45,15 @@ public static void setLookFeel() {

// 不带LookAndFeel结尾的皮肤使用SubstanceLookAndFeel.setSkin
// SubstanceLookAndFeel.setSkin(new GraphiteSkin());
SubstanceLookAndFeel.setSkin("org.pushingpixels.substance.api.skin.GraphiteSkin");

SubstanceCortex.GlobalScope.setSkin("org.pushingpixels.substance.api.skin.GraphiteSkin");
String os = System.getProperty("os.name");
if(os.startsWith("Mac"))
{
SubstanceLookAndFeel.setFontPolicy(new DefaultMacFontPolicy());
SubstanceCortex.GlobalScope.setFontPolicy(new DefaultMacFontPolicy());
} else if(os.startsWith("Linux"))
{
SubstanceLookAndFeel.setFontPolicy(new DefaultKDEFontPolicy());
SubstanceCortex.GlobalScope.setFontPolicy(new DefaultKDEFontPolicy());
}
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public MainFrame() {
Toolkit t = Toolkit.getDefaultToolkit();
Dimension d = t.getScreenSize();
main = new JFrame("Cknife 1.0 Release");
main.setIconImage(new ImageIcon(getClass().getResource("/com/ms509/images/main.png")).getImage());
main.setIconImage(new ImageIcon(getClass().getResource("/main.png")).getImage());
main.setSize(900, 480);
main.setLocation((d.width - main.getWidth()) / 2,
(d.height - main.getHeight()) / 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private void UpdateData(String result) {
Vector<Object> vector = new Vector<Object>();
for (int m = 0; m < cols.length; m++) {
if (m == 0) {
vector.add(new ImageIcon(getClass().getResource("/com/ms509/images/data.png")));
vector.add(new ImageIcon(getClass().getResource("/data.png")));
}
vector.add(cols[m].replace("\t", ""));

Expand Down Expand Up @@ -452,7 +452,7 @@ public static void showtable() {
Vector<Object> vector = new Vector<Object>();
for (int m = 0; m < columns; m++) {
if (m == 0) {
vector.add(new ImageIcon("".getClass().getResource("/com/ms509/images/data.png")));
vector.add(new ImageIcon("".getClass().getResource("/data.png")));
}
// 添加到向量vector中,后续加入到table里面显示
vector.add(cols[m].replace("\t", ""));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public void run() {
case "文件夹":
Vector vector = new Vector<>();
vector.add(new ImageIcon(getClass().getResource(
"/com/ms509/images/folder.png")));
"folder.png")));
vector.add("newFolder");
vector.add(Common.getTime());
vector.add("0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ private void UpdateData(String result) {
Vector<Object> vector = new Vector<Object>();
for (int m = 0; m < cols.length; m++) {
if (m == 0) {
vector.add(new ImageIcon(getClass().getResource("/com/ms509/images/data.png")));
vector.add(new ImageIcon(getClass().getResource("/data.png")));
}
vector.add(cols[m].replace("\t", ""));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import com.ms509.util.GBC;
import com.ms509.util.Safe;
import com.ms509.util.TreeMethod;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils.Text;


import java.awt.Dimension;
import java.awt.GridBagLayout;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.ms509.util;
public class NodeData
{
public int nodetype;
public String nodedata;
public NodeData(int nodetype,String nodedata)
{
this.nodetype = nodetype;
this.nodedata = nodedata;
}
public String toString() {
return this.nodedata;
}
public class DataType
{
public final static int DATABASE = 1;
public final static int TABLE = 2;
public final static int COLUMN = 3;
}
}
package com.ms509.util;

public class NodeData
{
public int nodetype;
public String nodedata;
public NodeData(int nodetype,String nodedata)
{
this.nodetype = nodetype;
this.nodedata = nodedata;
}
public String toString() {
return this.nodedata;
}
public class DataType
{
public final static int DATABASE = 1;
public final static int TABLE = 2;
public final static int COLUMN = 3;
}
}
Loading