Examples of IIconInformation


Examples of org.freeplane.features.icon.IIconInformation

    gridlayout.setHgap(3);
    gridlayout.setVgap(3);
    iconPanel.setLayout(gridlayout);
    iconLabels = new JLabel[numOfIcons];
    for (int i = 0; i < numOfIcons; ++i) {
      final IIconInformation icon = icons.get(i);
      iconPanel.add(iconLabels[i] = new JLabel(icon.getIcon()));
      iconLabels[i].setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
      iconLabels[i].addMouseListener(this);
    }
    final int perIconSize = 27;
    iconPanel.setPreferredSize(new Dimension(xDimension * perIconSize, yDimension * perIconSize));
 
View Full Code Here

Examples of org.freeplane.features.icon.IIconInformation

    }
  }

  private int findIndexByKeyEvent(final KeyEvent keyEvent) {
    for (int i = 0; i < icons.size(); i++) {
      final IIconInformation info = icons.get(i);
      final KeyStroke iconKeyStroke = info.getKeyStroke();
      if (iconKeyStroke != null
              && (keyEvent.getKeyCode() == iconKeyStroke.getKeyCode()
                      && keyEvent.getKeyCode() != 0
                      && (iconKeyStroke.getModifiers() & InputEvent.SHIFT_MASK) == (keyEvent.getModifiers() & InputEvent.SHIFT_MASK) || keyEvent
                  .getKeyChar() == iconKeyStroke.getKeyChar()) && keyEvent.getKeyChar() != 0
View Full Code Here

Examples of org.freeplane.features.icon.IIconInformation

  private void select(final Position position) {
    unhighlight(getSelectedPosition());
    setSelectedPosition(position);
    highlight(position);
    final int index = calculateIndex(position);
    final IIconInformation iconInformation = icons.get(index);
    final String keyStroke = ResourceController.getResourceController().getProperty(iconInformation.getShortcutKey());
    if (keyStroke != null) {
      descriptionLabel.setText(iconInformation.getTranslationValueLabel() + ", " + keyStroke);
    }
    else {
      descriptionLabel.setText(iconInformation.getTranslationValueLabel());
    }
  }
View Full Code Here

Examples of org.freeplane.features.icon.IIconInformation

    actions.add(modeController.getAction("RemoveIcon_0_Action"));
    actions.add(modeController.getAction("RemoveIconAction"));
    actions.add(modeController.getAction("RemoveAllIconsAction"));

    for (final AFreeplaneAction iconAction : actions) {
      final IIconInformation info = (IIconInformation) iconAction;
      optionPanelBuilder.addCreator("Keystrokes/icons", new IPropertyControlCreator() {
        public IPropertyControl createControl() {
          final KeyProperty keyProperty = new KeyProperty(info.getShortcutKey(), info.getTranslationKeyLabel());
          keyProperty.setImageIcon(info.getIcon());
          keyProperty.disableModifiers();
          return keyProperty;
        }
      }, IndexedTree.AS_CHILD);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.