Skip to content

Commit

Permalink
mass update
Browse files Browse the repository at this point in the history
  • Loading branch information
bulenkov committed Jan 23, 2014
1 parent e5aefdb commit 10f0834
Show file tree
Hide file tree
Showing 279 changed files with 4,089 additions and 1,015 deletions.
Empty file modified .idea/.name
100644 → 100755
Empty file.
Empty file modified .idea/codeStyleSettings.xml
100644 → 100755
Empty file.
Empty file modified .idea/compiler.xml
100644 → 100755
Empty file.
4 changes: 1 addition & 3 deletions .idea/copyright/profiles_settings.xml
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion .idea/dictionaries/kb.xml
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified .idea/encodings.xml
100644 → 100755
Empty file.
12 changes: 12 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/IconLoader.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified .idea/misc.xml
100644 → 100755
Empty file.
Empty file modified .idea/modules.xml
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions .idea/runConfigurations/SwingSet2.xml
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified .idea/scopes/scope_settings.xml
100644 → 100755
Empty file.
Empty file modified .idea/uiDesigner.xml
100644 → 100755
Empty file.
Empty file modified .idea/vcs.xml
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions Darcula.iml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="IconLoader" level="project" />
</component>
</module>

Binary file removed lib/SwingSet2.jar
Binary file not shown.
Binary file added lib/iconloader.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/com/bulenkov/darcula/DarculaDefaultTableHeaderRenderer.java
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intellij.ide.ui.laf.darcula;
package com.bulenkov.darcula;

import javax.swing.*;
import javax.swing.plaf.UIResource;
Expand Down
156 changes: 63 additions & 93 deletions src/com/bulenkov/darcula/DarculaLaf.java
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bulenkov.darcula;

import com.bulenkov.darcula.util.ColorUtil;
import com.bulenkov.darcula.util.StringUtil;
import com.bulenkov.darcula.util.UIManagerUtil;
import com.bulenkov.iconloader.util.ColorUtil;
import com.bulenkov.iconloader.util.StringUtil;
import com.bulenkov.iconloader.util.SystemInfo;
import sun.awt.AppContext;

import javax.swing.*;
Expand All @@ -30,8 +15,6 @@
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.io.*;
Expand Down Expand Up @@ -75,26 +58,16 @@ private void callInit(String method, UIDefaults defaults) {
@SuppressWarnings("UnusedParameters")
private static void log(Exception e) {
//everything is gonna be alright
e.printStackTrace();
//e.printStackTrace();
}

@Override
public UIDefaults getDefaults() {
final Timer[] timer = new Timer[1];
timer[0] = new Timer(2000, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
UIManagerUtil.showInfo();
timer[0].stop();
}
});
timer[0].start();

try {
final Method superMethod = BasicLookAndFeel.class.getDeclaredMethod("getDefaults");
superMethod.setAccessible(true);
final UIDefaults metalDefaults =
(UIDefaults)superMethod.invoke(new MetalLookAndFeel());
(UIDefaults)superMethod.invoke(new MetalLookAndFeel());
final UIDefaults defaults = (UIDefaults)superMethod.invoke(base);
initInputMapDefaults(defaults);
initIdeaDefaults(defaults);
Expand All @@ -121,10 +94,10 @@ private static void patchComboBox(UIDefaults metalDefaults, UIDefaults defaults)
private static void patchStyledEditorKit() {
try {
StyleSheet defaultStyles = new StyleSheet();
InputStream is = DarculaLaf.class.getResourceAsStream("darcula.css");
Reader r = new BufferedReader(new InputStreamReader(is, "UTF-8"));
defaultStyles.loadRules(r, null);
r.close();
InputStream is = DarculaLaf.class.getResourceAsStream("darcula.css");
Reader r = new BufferedReader(new InputStreamReader(is, "UTF-8"));
defaultStyles.loadRules(r, null);
r.close();
final Field keyField = HTMLEditorKit.class.getDeclaredField("DEFAULT_STYLES_KEY");
keyField.setAccessible(true);
final Object key = keyField.get(null);
Expand Down Expand Up @@ -153,54 +126,54 @@ public void initComponentDefaults(UIDefaults defaults) {
static void initIdeaDefaults(UIDefaults defaults) {
loadDefaults(defaults);
defaults.put("Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"ctrl C", "copy",
"ctrl V", "paste",
"ctrl X", "cut",
"COPY", "copy",
"PASTE", "paste",
"CUT", "cut",
"control INSERT", "copy",
"shift INSERT", "paste",
"shift DELETE", "cut",
"RIGHT", "selectNextColumn",
"KP_RIGHT", "selectNextColumn",
"LEFT", "selectPreviousColumn",
"KP_LEFT", "selectPreviousColumn",
"DOWN", "selectNextRow",
"KP_DOWN", "selectNextRow",
"UP", "selectPreviousRow",
"KP_UP", "selectPreviousRow",
"shift RIGHT", "selectNextColumnExtendSelection",
"shift KP_RIGHT", "selectNextColumnExtendSelection",
"shift LEFT", "selectPreviousColumnExtendSelection",
"shift KP_LEFT", "selectPreviousColumnExtendSelection",
"shift DOWN", "selectNextRowExtendSelection",
"shift KP_DOWN", "selectNextRowExtendSelection",
"shift UP", "selectPreviousRowExtendSelection",
"shift KP_UP", "selectPreviousRowExtendSelection",
"PAGE_UP", "scrollUpChangeSelection",
"PAGE_DOWN", "scrollDownChangeSelection",
"HOME", "selectFirstColumn",
"END", "selectLastColumn",
"shift PAGE_UP", "scrollUpExtendSelection",
"shift PAGE_DOWN", "scrollDownExtendSelection",
"shift HOME", "selectFirstColumnExtendSelection",
"shift END", "selectLastColumnExtendSelection",
"ctrl PAGE_UP", "scrollLeftChangeSelection",
"ctrl PAGE_DOWN", "scrollRightChangeSelection",
"ctrl HOME", "selectFirstRow",
"ctrl END", "selectLastRow",
"ctrl shift PAGE_UP", "scrollRightExtendSelection",
"ctrl shift PAGE_DOWN", "scrollLeftExtendSelection",
"ctrl shift HOME", "selectFirstRowExtendSelection",
"ctrl shift END", "selectLastRowExtendSelection",
"TAB", "selectNextColumnCell",
"shift TAB", "selectPreviousColumnCell",
//"ENTER", "selectNextRowCell",
"shift ENTER", "selectPreviousRowCell",
"ctrl A", "selectAll",
//"ESCAPE", "cancel",
"F2", "startEditing"
"ctrl C", "copy",
"ctrl V", "paste",
"ctrl X", "cut",
"COPY", "copy",
"PASTE", "paste",
"CUT", "cut",
"control INSERT", "copy",
"shift INSERT", "paste",
"shift DELETE", "cut",
"RIGHT", "selectNextColumn",
"KP_RIGHT", "selectNextColumn",
"LEFT", "selectPreviousColumn",
"KP_LEFT", "selectPreviousColumn",
"DOWN", "selectNextRow",
"KP_DOWN", "selectNextRow",
"UP", "selectPreviousRow",
"KP_UP", "selectPreviousRow",
"shift RIGHT", "selectNextColumnExtendSelection",
"shift KP_RIGHT", "selectNextColumnExtendSelection",
"shift LEFT", "selectPreviousColumnExtendSelection",
"shift KP_LEFT", "selectPreviousColumnExtendSelection",
"shift DOWN", "selectNextRowExtendSelection",
"shift KP_DOWN", "selectNextRowExtendSelection",
"shift UP", "selectPreviousRowExtendSelection",
"shift KP_UP", "selectPreviousRowExtendSelection",
"PAGE_UP", "scrollUpChangeSelection",
"PAGE_DOWN", "scrollDownChangeSelection",
"HOME", "selectFirstColumn",
"END", "selectLastColumn",
"shift PAGE_UP", "scrollUpExtendSelection",
"shift PAGE_DOWN", "scrollDownExtendSelection",
"shift HOME", "selectFirstColumnExtendSelection",
"shift END", "selectLastColumnExtendSelection",
"ctrl PAGE_UP", "scrollLeftChangeSelection",
"ctrl PAGE_DOWN", "scrollRightChangeSelection",
"ctrl HOME", "selectFirstRow",
"ctrl END", "selectLastRow",
"ctrl shift PAGE_UP", "scrollRightExtendSelection",
"ctrl shift PAGE_DOWN", "scrollLeftExtendSelection",
"ctrl shift HOME", "selectFirstRowExtendSelection",
"ctrl shift END", "selectLastRowExtendSelection",
"TAB", "selectNextColumnCell",
"shift TAB", "selectPreviousColumnCell",
//"ENTER", "selectNextRowCell",
"shift ENTER", "selectPreviousRowCell",
"ctrl A", "selectAll",
//"ESCAPE", "cancel",
"F2", "startEditing"
}));
}

Expand Down Expand Up @@ -247,9 +220,9 @@ private static Object parseValue(String key, String value) {
if (key.endsWith("Insets")) {
final List<String> numbers = StringUtil.split(value, ",");
return new InsetsUIResource(Integer.parseInt(numbers.get(0)),
Integer.parseInt(numbers.get(1)),
Integer.parseInt(numbers.get(2)),
Integer.parseInt(numbers.get(3)));
Integer.parseInt(numbers.get(1)),
Integer.parseInt(numbers.get(2)),
Integer.parseInt(numbers.get(3)));
} else if (key.endsWith(".border")) {
try {
return Class.forName(value).newInstance();
Expand Down Expand Up @@ -331,9 +304,9 @@ public void uninitialize() {
protected void loadSystemColors(UIDefaults defaults, String[] systemColors, boolean useNative) {
try {
final Method superMethod = BasicLookAndFeel.class.getDeclaredMethod("loadSystemColors",
UIDefaults.class,
String[].class,
boolean.class);
UIDefaults.class,
String[].class,
boolean.class);
superMethod.setAccessible(true);
superMethod.invoke(base, defaults, systemColors, useNative);
}
Expand Down Expand Up @@ -390,7 +363,4 @@ private static void installCutCopyPasteShortcuts(InputMap inputMap, boolean useS
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK | InputEvent.CTRL_DOWN_MASK), pasteActionKey);
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK | InputEvent.CTRL_DOWN_MASK), DefaultEditorKit.cutAction);
}



}
15 changes: 0 additions & 15 deletions src/com/bulenkov/darcula/DarculaLookAndFeelInfo.java
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bulenkov.darcula;

import javax.swing.*;
Expand Down
2 changes: 1 addition & 1 deletion src/com/bulenkov/darcula/DarculaTableHeaderBorder.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void paintBorder(Component c, Graphics g, int x, int y, int width, int he

@Override
public Insets getBorderInsets(Component c) {
return new Insets(0, 0, 0, 0);
return new Insets(0,0,0,0);
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/com/bulenkov/darcula/DarculaTableHeaderUI.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package com.bulenkov.darcula;

import com.bulenkov.darcula.util.ColorUtil;
import com.bulenkov.darcula.util.GraphicsConfig;
import com.bulenkov.darcula.util.Gray;
import com.bulenkov.iconloader.util.ColorUtil;
import com.bulenkov.iconloader.util.GraphicsConfig;
import com.bulenkov.iconloader.util.Gray;

import javax.swing.*;
import javax.swing.plaf.ComponentUI;
Expand Down
Loading

0 comments on commit 10f0834

Please sign in to comment.