コード例 #1
0
ファイル: LightSwitch.cs プロジェクト: enjre/CS354
 public static void Main(string[] args)
 {
     SwingUtilities.invokeLater(() =>
     {
         new LightSwitch();
     });
 }
コード例 #2
0
 public virtual void SafeRefreshImage()
 {
     SwingUtilities.invokeLater(() =>
     {
         RefreshImage();
     });
 }
コード例 #3
0
 public void actionPerformed(ActionEvent param1ActionEvent)
 {
     outerInstance.t.stop();
     SwingUtilities.invokeLater(() =>
     {
         outerInstance.previousFocus.requestFocus();
     });
 }
コード例 #4
0
 private void checkAndInvokeLater(ThreadStart paramRunnable)
 {
     if (!Showing)
     {
         return;
     }
     if (this.o_currentTimes % this.o_timeToInvoke == 0)
     {
         SwingUtilities.invokeLater(paramRunnable);
     }
 }
コード例 #5
0
//JAVA TO C# CONVERTER WARNING: 'sealed override' parameters are not available in .NET:
//ORIGINAL LINE: @Override public java.awt.Component getTableCellEditorComponent(sealed override javax.swing.JTable table, sealed override Object value, sealed override bool isSelected, sealed override int row, sealed override int column)
            public override Component getTableCellEditorComponent(JTable table, object value, bool isSelected, int row, int column)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'sealed override':
//ORIGINAL LINE: sealed override javax.swing.JTextField tf = ((javax.swing.JTextField) getComponent());
                JTextField tf = ((JTextField)Component);

                tf.Text = string.Format("0x{0:X}", Integer.decode((string)table.Model.getValueAt(row, column)));

                // needed for double-click to work, otherwise the second click
                // is interpreted to position the caret
                SwingUtilities.invokeLater(() =>
                {
                    // automatically select text after '0x'
                    tf.select(2, tf.Text.Length());
                });
                return(tf);
            }
コード例 #6
0
 public virtual void setProgress(string paramString, int paramInt)
 {
     if (!VisibleAndShowing)
     {
         this.o_currentTimes = paramInt;
         return;
     }
     if (SwingUtilities.EventDispatchThread)
     {
         this.o_descriptionLabel.Text = paramString;
         this.o_progressBar.Value     = this.o_currentTimes;
     }
     else
     {
         this.o_currentTimes = paramInt;
         SwingUtilities.invokeLater(new SetProgress(this, paramString, this.o_currentTimes));
     }
 }