Package diffpy :: Package pdfgui :: Package gui :: Module phaseconfigurepanel :: Class PhaseConfigurePanel
[hide private]
[frames] | no frames]

Class PhaseConfigurePanel

source code

     object --+                
              |                
wx._core.Object --+            
                  |            
wx._core.EvtHandler --+        
                      |        
        wx._core.Window --+    
                          |    
          wx._windows.Panel --+
                              |
                 object --+   |
                          |   |
          pdfpanel.PDFPanel --+
                              |
                             PhaseConfigurePanel

Panel for configuring a phase.

Data members:
    structure       -- reference to PDFStructure
    _focusedText    -- value of a cell or textctrl before it changes
    lConstraintsMap -- map of TextCtrl name to parameter name
    _row            -- row,    where rightclick occured
    _col            -- column, where rightclick occured



Instance Methods [hide private]
 
__init__(self, *args, **kwds)
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, ...
source code
 
__set_properties(self) source code
 
__do_layout(self) source code
 
__customProperties(self)
Custom properties for the panel.
source code
 
onTextCtrlKey(panel, event)
Process a textCtrl key event as if the textCtrl was a grid cell.
source code
 
_cache(self)
Cache the current structure and constraints for future comparison.
source code
 
refresh(self)
Refreshes widgets on the panel.
source code
 
restrictConstrainedParameters(self)
Set 'read-only' boxes that correspond to constrained parameters.
source code
 
applyTextCtrlChange(self, id, value)
Update a structure according to a change in a TextCtrl.
source code
 
applyCellChange(self, i, j, value)
Update an atom according to a change in a cell.
source code
 
onSetFocus(self, event)
Saves a TextCtrl value, to be compared in onKillFocus later.
source code
 
onKillFocus(self, event)
Check value of TextCtrl and update structure if necessary.
source code
 
onSelectedPairs(self, event)
Check to see if the value of the selected pairs is valid.
source code
 
onLabelRightClick(self, event)
Bring up right-click menu.
source code
 
onCellRightClick(self, event)
Bring up right-click menu.
source code
 
onEditorShown(self, event)
Capture the focused text when the grid editor is shown.
source code
 
onCellChange(self, event)
Update focused and selected text when a cell changes.
source code
 
fillCells(self, value)
Fill cells with a given value.
source code
 
onKey(self, event)
Catch key events in the panel.
source code
 
popupMenu(self, window, x, y)
Creates the popup menu...
source code
 
onPopupInsert(self, event)
Adds rows to the grid.
source code
 
onPopupDelete(self, event)
Deletes the row under mouse pointer from the grid.
source code
 
onPopupCopy(self, event)
Copy selected cells.
source code
 
onPopupPaste(self, event)
Paste previously copied cells.
source code
 
onPopupSupercell(self, event)
Create a supercell with the supercell dialog.
source code
 
onPopupSpaceGroup(self, event)
Create a supercell with the supercell dialog.
source code

Inherited from wx._windows.Panel: Create, SetFocusIgnoringChildren, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from pdfpanel.PDFPanel: setToolTips

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods [hide private]

Inherited from wx._windows.Panel: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Properties [hide private]

Inherited from wx._windows.Panel: thisown

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 

__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, 
    Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, 
    String name=PanelNameStr) -> Panel

Overrides: wx._windows.Panel.__init__
(inherited documentation)

onTextCtrlKey(panel, event)

source code 
Process a textCtrl key event as if the textCtrl was a grid cell.

This catches ESC and ENTER events in textCtrls and processes them as if the
textCtrl were a grid cell. This method can be bound to the wx.EVT_KEY_DOWN
event of any textCtrl. See phaseconfigurepanel.py in diffpy.pdfgui.gui for
an example.

ESC     --  Cancel the edit and highlight the text. This requires that
            panel has a _focusedText attribute that stores the previous value.
ENTER   --  Confirm the edit and move to the next cell (the default TAB
            behavior).

refresh(self)

source code 
Refreshes widgets on the panel.

Overrides: pdfpanel.PDFPanel.refresh

applyTextCtrlChange(self, id, value)

source code 
Update a structure according to a change in a TextCtrl.

id      --  textctrl id
value   --  new value

applyCellChange(self, i, j, value)

source code 
Update an atom according to a change in a cell.

i       --  cell position
j       --  cell position
value   --  new value

fillCells(self, value)

source code 
Fill cells with a given value.

value       --  string value to place into cells

This uses the member variable _selectedCells, a list of (i,j) tuples for
the selected cells.

popupMenu(self, window, x, y)

source code 
Creates the popup menu

window  --  window, where to popup a menu
x       --  x coordinate
y       --  y coordinate