• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java CellEditorComponentWithBrowseButton类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.intellij.util.ui.CellEditorComponentWithBrowseButton的典型用法代码示例。如果您正苦于以下问题:Java CellEditorComponentWithBrowseButton类的具体用法?Java CellEditorComponentWithBrowseButton怎么用?Java CellEditorComponentWithBrowseButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

CellEditorComponentWithBrowseButton类属于com.intellij.util.ui包,在下文中一共展示了CellEditorComponentWithBrowseButton类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: LogFileCellEditor

点赞 3

import com.intellij.util.ui.CellEditorComponentWithBrowseButton; //导入依赖的package包/类
public LogFileCellEditor(LogFileOptions options) {
  myLogFileOptions = options;
  myComponent = new CellEditorComponentWithBrowseButton<JTextField>(new TextFieldWithBrowseButton(), this);
  getChildComponent().setEditable(false);
  getChildComponent().setBorder(null);
  myComponent.getComponentWithButton().getButton().addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(@NotNull ActionEvent e) {
      showEditorDialog(myLogFileOptions);
      JTextField textField = getChildComponent();
      textField.setText(myLogFileOptions.getName());
      textField.requestFocus();
      myModel.fireTableDataChanged();
    }
  });
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:17,
代码来源:LogConfigurationPanel.java

示例2: LogFileCellEditor

点赞 3

import com.intellij.util.ui.CellEditorComponentWithBrowseButton; //导入依赖的package包/类
public LogFileCellEditor(LogFileOptions options) {
  myLogFileOptions = options;
  myComponent = new CellEditorComponentWithBrowseButton<JTextField>(new TextFieldWithBrowseButton(), this);
  getChildComponent().setEditable(false);
  getChildComponent().setBorder(null);
  myComponent.getComponentWithButton().getButton().addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      showEditorDialog(myLogFileOptions);
      JTextField textField = getChildComponent();
      textField.setText(myLogFileOptions.getName());
      textField.requestFocus();
      myModel.fireTableDataChanged();
    }
  });
}
 

开发者ID:lshain-android-source,
项目名称:tools-idea,
代码行数:17,
代码来源:LogConfigurationPanel.java

示例3: LogFileCellEditor

点赞 3

import com.intellij.util.ui.CellEditorComponentWithBrowseButton; //导入依赖的package包/类
public LogFileCellEditor(LogFileOptions options) {
  myLogFileOptions = options;
  myComponent = new CellEditorComponentWithBrowseButton<JTextField>(new TextFieldWithBrowseButton(), this);
  getChildComponent().setEditable(false);
  getChildComponent().setBorder(null);
  myComponent.getComponentWithButton().getButton().addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      showEditorDialog(myLogFileOptions);
      JTextField textField = getChildComponent();
      textField.setText(myLogFileOptions.getName());
      IdeFocusManager.getGlobalInstance().doForceFocusWhenFocusSettlesDown(textField);
      myModel.fireTableDataChanged();
    }
  });
}
 

开发者ID:consulo,
项目名称:consulo,
代码行数:17,
代码来源:LogConfigurationPanel.java

示例4: PropertyValueCellEditor

点赞 2

import com.intellij.util.ui.CellEditorComponentWithBrowseButton; //导入依赖的package包/类
public PropertyValueCellEditor() {
  myComponent = new CellEditorComponentWithBrowseButton<JTextField>(new TextFieldWithBrowseButton(), this);
  getChildComponent().setBorder(BorderFactory.createLineBorder(Color.black));

  FixedSizeButton button = myComponent.getComponentWithButton().getButton();
  button.setIcon(IconUtil.getAddIcon());
  button.setToolTipText(AntBundle.message("ant.property.value.editor.insert.macro.tooltip.text"));
  button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      MacrosDialog dialog = new MacrosDialog(getChildComponent());
      if (dialog.showAndGet() && dialog.getSelectedMacro() != null) {
        JTextField textField = getChildComponent();

        String macro = dialog.getSelectedMacro().getName();
        int position = textField.getCaretPosition();
        try {
          textField.getDocument().insertString(position, "$" + macro + "$", null);
          textField.setCaretPosition(position + macro.length() + 2);
        }
        catch (BadLocationException ex) {
          LOG.error(ex);
        }
        textField.requestFocus();
      }
    }
  });
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:28,
代码来源:AntUIUtil.java

示例5: getTableCellEditorComponent

点赞 2

import com.intellij.util.ui.CellEditorComponentWithBrowseButton; //导入依赖的package包/类
public Component getTableCellEditorComponent(final JTable table, final Object value, final boolean isSelected, final int row, final int column) {
    final ActionListener listener = new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            createBrowserDialog();
        }
    };
    component = new CellEditorComponentWithBrowseButton<JTextField>(new TextFieldWithBrowseButton(listener), this);
    component.getChildComponent().setText((String) value);
    return component;
}
 

开发者ID:Microsoft,
项目名称:vso-intellij,
代码行数:11,
代码来源:ServerPathCellEditor.java

示例6: PropertyValueCellEditor

点赞 2

import com.intellij.util.ui.CellEditorComponentWithBrowseButton; //导入依赖的package包/类
public PropertyValueCellEditor() {
  myComponent = new CellEditorComponentWithBrowseButton<JTextField>(new TextFieldWithBrowseButton(), this);
  getChildComponent().setBorder(BorderFactory.createLineBorder(Color.black));

  FixedSizeButton button = myComponent.getComponentWithButton().getButton();
  button.setIcon(IconUtil.getAddIcon());
  button.setToolTipText(AntBundle.message("ant.property.value.editor.insert.macro.tooltip.text"));
  button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      MacrosDialog dialog = new MacrosDialog(getChildComponent());
      dialog.show();
      if (dialog.isOK() && dialog.getSelectedMacro() != null) {
        JTextField textField = getChildComponent();

        String macro = dialog.getSelectedMacro().getName();
        int position = textField.getCaretPosition();
        try {
          textField.getDocument().insertString(position, "$" + macro + "$", null);
          textField.setCaretPosition(position + macro.length() + 2);
        }
        catch (BadLocationException ex) {
          LOG.error(ex);
        }
        textField.requestFocus();
      }
    }
  });
}
 

开发者ID:lshain-android-source,
项目名称:tools-idea,
代码行数:29,
代码来源:AntUIUtil.java

示例7: PropertyValueCellEditor

点赞 2

import com.intellij.util.ui.CellEditorComponentWithBrowseButton; //导入依赖的package包/类
public PropertyValueCellEditor()
{
	myComponent = new CellEditorComponentWithBrowseButton<JTextField>(new TextFieldWithBrowseButton(), this);
	getChildComponent().setBorder(BorderFactory.createLineBorder(Color.black));

	FixedSizeButton button = myComponent.getComponentWithButton().getButton();
	button.setIcon(IconUtil.getAddIcon());
	button.setToolTipText(AntBundle.message("ant.property.value.editor.insert.macro.tooltip.text"));
	button.addActionListener(new ActionListener()
	{
		@Override
		public void actionPerformed(ActionEvent e)
		{
			MacrosDialog dialog = new MacrosDialog(getChildComponent());
			dialog.show();
			if(dialog.isOK() && dialog.getSelectedMacro() != null)
			{
				JTextField textField = getChildComponent();

				String macro = dialog.getSelectedMacro().getName();
				int position = textField.getCaretPosition();
				try
				{
					textField.getDocument().insertString(position, "$" + macro + "$", null);
					textField.setCaretPosition(position + macro.length() + 2);
				}
				catch(BadLocationException ex)
				{
					LOG.error(ex);
				}
				textField.requestFocus();
			}
		}
	});
}
 

开发者ID:consulo,
项目名称:consulo-apache-ant,
代码行数:36,
代码来源:AntUIUtil.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)