Changeset 1058


Ignore:
Timestamp:
Jun 14, 2011, 11:57:02 PM (6 years ago)
Author:
stefan
Message:

fixed control END

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/jlatexeditor/JLatexEditorJFrame.java

    r1054 r1058  
    17151715
    17161716  public void valueChanged(TreeSelectionEvent e) {
     1717    if (!(structureTree.getLastSelectedPathComponent() instanceof BackgroundParser.StructureEntry)) return;
     1718
    17171719    BackgroundParser.StructureEntry structureEntry = (BackgroundParser.StructureEntry) structureTree.getLastSelectedPathComponent();
    17181720    if(structureEntry == null) return;
  • trunk/src/jlatexeditor/gproperties/GProperties.java

    r1056 r1058  
    208208    properties.addEntry(new Def("shortcut.jump to front", SHORTCUT, "control BEGIN"));
    209209    properties.addEntry(new Def("shortcut.jump to end", SHORTCUT, "control END"));
    210     properties.addEntry(new Def("shortcut.move view up", SHORTCUT, "alt UP"));
    211     properties.addEntry(new Def("shortcut.move view down", SHORTCUT, "alt DOWN"));
     210    properties.addEntry(new Def("shortcut.move view up", SHORTCUT, "control UP")); // alt UP
     211    properties.addEntry(new Def("shortcut.move view down", SHORTCUT, "control DOWN")); // alt DOWN
    212212    properties.addEntry(new Def("shortcut.remove line", SHORTCUT, "control Y"));
    213213    properties.addEntry(new Def("shortcut.remove line before caret", SHORTCUT, "control U"));
  • trunk/src/sce/component/SCEPane.java

    r996 r1058  
    66
    77import javax.swing.*;
     8import javax.swing.text.TextAction;
    89import java.awt.*;
    910import java.awt.datatransfer.DataFlavor;
    1011import java.awt.datatransfer.StringSelection;
    1112import java.awt.datatransfer.Transferable;
     13import java.awt.event.ActionEvent;
    1214import java.awt.event.FocusEvent;
    1315import java.awt.event.FocusListener;
     16import java.beans.PropertyChangeListener;
    1417import java.text.AttributedString;
    1518import java.util.ArrayList;
     
    114117  public SCEPane(SourceCodeEditor sourceCodeEditor) {
    115118    this.sourceCodeEditor = sourceCodeEditor;
     119
     120    // TODO
     121    /*
     122    getInputMap().put(KeyStroke.getKeyStroke("control BEGIN"), "bla");
     123    getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control BEGIN"), "bla");
     124    getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("control BEGIN"), "bla");
     125    getActionMap().put("bla", new Action() {
     126      @Override
     127      public Object getValue(String key) {
     128        System.out.println("SCEPane.getValue");
     129        return null;
     130      }
     131
     132      @Override
     133      public void putValue(String key, Object value) {
     134        System.out.println("SCEPane.putValue");
     135      }
     136
     137      @Override
     138      public void setEnabled(boolean b) {
     139        System.out.println("SCEPane.setEnabled");
     140      }
     141
     142      @Override
     143      public boolean isEnabled() {
     144        System.out.println("SCEPane.isEnabled");
     145        return true;
     146      }
     147
     148      @Override
     149      public void addPropertyChangeListener(PropertyChangeListener listener) {
     150        System.out.println("SCEPane.addPropertyChangeListener");
     151      }
     152
     153      @Override
     154      public void removePropertyChangeListener(PropertyChangeListener listener) {
     155        System.out.println("SCEPane.removePropertyChangeListener");
     156      }
     157
     158      @Override
     159      public void actionPerformed(ActionEvent e) {
     160        System.out.println("SCEPane.actionPerformed");
     161      }
     162    });
     163    */
    116164
    117165    setOpaque(true);
  • trunk/src/sce/component/SourceCodeEditor.java

    r969 r1058  
    5252    add(scrollPane, BorderLayout.CENTER);
    5353    add(markerBar, BorderLayout.EAST);
     54
     55    scrollPane.setInputMap(JComponent.WHEN_FOCUSED, new InputMap());
     56    scrollPane.setInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, new InputMap());
    5457
    5558    new BracketHighlighting(this);
Note: See TracChangeset for help on using the changeset viewer.